NextSMS for PHP

Check & fix styling Psalm Tests Maintenance

The NextSMS SDK for PHP makes it easy for developers to access NextSMS Services in their PHP code, and build robust applications and software using services like Bulk SMS delivery, Sub customers, and more.

For more see documentation.

Usage

Quick Examples

require 'vendor/autoload.php';

use NextSMS\SDK\Client;

// Intiate with credentials
$client = new Client([
    'username' => 'YOUR_USERNAME',
    'password' => 'YOUR_PASSWORD',
    'enviroment' => 'testing', // or production
]);

// Setup the transaction
$data = [
    'from'  => 'NEXTSMS',
    'to'    => '2557123456789',
    'text'  => 'Hello World',
];

// Execute
$result = $client->singleDestination($data);

// Print results
var_dump($result);

API available

See Full API Docs.

  • singleDestination(array $data)
  • multipleDestinations(array $data)
  • multipleMessagesToMultipleDestinations(array $data)
  • multipleMessagesToMultipleDifferentDestinations($data)
  • scheduleSms(array $data)
  • getDeliveryReports()
  • getDeliveryReportsWithMessageId(int $messageId)
  • getDeliveryReportsWithSpecificDateRange(array $data)
  • getAllSentSmsLogs(array $data)
  • getAllSentSms(array $data)
  • registerSubCustomer(array $data)
  • rechargeCustomer(array $data)
  • deductCustomer(array $data)
  • getSmsBalance()

Testing

composer test

Opening Issues

If you have a feature requrest or you encounter a bug, please file an issue on our issue tracker on GitHub.

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please review our CONTRIBUTING for details.

Security

If you discover any security related issues, please email alphaolomi@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.