A simple PHP SDK for the Smstools.com API (v1).
This client provides an easy way to send SMS or Voice messages and manage your account using your client_id and client_secret.
composer require smstools-api/smstools-php-sdkuse Smstools\Client;
$client = new Client(
clientId: 'YOUR_CLIENT_ID',
clientSecret: 'YOUR_CLIENT_SECRET',
baseUrl: 'https://api.smstools.com/v1/' // optional, default value
);X-Client-Id: YOUR_CLIENT_ID
X-Client-Secret: YOUR_CLIENT_SECRETrequire 'vendor/autoload.php';
use Smstools\Client;
$client = new Client('your-client-id', 'your-client-secret');
try {
$response = $client->sms()->send(
to: '32470000000',
message: 'Hello World!',
sender: 'Smstools'
);
echo "✅ Message sent successfully!\n";
print_r($response);
} catch (Exception $e) {
echo "❌ Error sending SMS: " . $e->getMessage();
}require 'vendor/autoload.php';
use Smstools\Client;
$client = new Client('your-client-id', 'your-client-secret');
try {
$response = $client->balance()->get();
print_r($response);
} catch (Exception $e) {
echo "Error: " . $e->getMessage();
}