smsbox / php-sdk
Send SMS message and more from your application with the SMSBOX PHP SDK
Installs: 25
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/smsbox/php-sdk
Requires
- php: >=7.4
- guzzlehttp/guzzle: ^7.9
- symfony/intl: ^5.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^9.6
README
The SMSBOX PHP SDK provides a simple and efficient way to send SMS messages directly from your PHP applications.
Whether you are sending alerts, notifications, or marketing messages, this SDK makes the process fast and easy to integrate.
For more information, visit the official website: SMSBOX
⚠️ Requirements
- PHP 7.4+ (compatible with PHP 8.x)
- Composer
📖 Documentation
For detailed information about the SMSBOX Sending SMS API parameters, see the official documentation: SMS API.
✉️ Features
- Send SMS messages quickly and reliably, customizable sender ID, scheduling, etc.
⚙️ Installation
Install via Composer:
composer require smsbox/php-sdk
⚡ Quick Start
<?php require __DIR__ . '/vendor/autoload.php'; use Smsbox\SmsboxClient; use Smsbox\Options\SMS\SmsOptions; use Smsbox\Messages\SmsMessage; use Smsbox\Enum\SMS\Strategy; try { $client = new SmsboxClient(SMSBOX_API_KEY); $message = new SmsMessage( ['+336XXXXXXXX'], 'Hello! This is a test message.' ); $options = (new SmsOptions()); ->strategy(Strategy::MARKETING); $message->options($options); $response = $client->sendSms($message); echo 'Message sent successfully. Reference ID: ' . $response['refId'] . PHP_EOL; } catch (GuzzleException|SmsboxException $e) { echo 'Error sending OTP: ' . $e->getMessage() . PHP_EOL . 'Code: ' . $e->getCode(); }
