PHP code example of shiftechafrica / smsales-php-sdk

1. Go to this page and download the library: Download shiftechafrica/smsales-php-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

shiftechafrica / smsales-php-sdk example snippets




use SMSALES\API\Trigger;

/**
 * ----------------------------------------
 *  SMSALES SDK Usage Examples
 * ----------------------------------------
 * Demonstrates how to interact with the
 * SMSALES API for sending and tracking SMS.
 */

/**
 * Fetch latest sent messages
 */
(new Trigger())->index();

/**
 * Get account SMS balance
 */
(new Trigger())->accountSmsBalance();

/**
 * Get sender ID SMS balance
 */
(new Trigger())->senderIDSmsBalance();

/**
 * Send bulk SMS
 */
(new Trigger())->send([
    "api_sender" => "shiftech", // Required — must match your registered Sender ID
    "message" => "Hello from SMSALES!", // Required
    "phone_numbers" => ["2547XXXXXXXX", "2541XXXXXXXX", "2547XXXXXXXX"], // Required
    "scheduled_at" => "2025-12-01 10:00:00", // Optional (Y-m-d H:i:s format)
    "callback_url" => "https://yourdomain.com/sms/callback" // Optional (POST endpoint)
]);
bash
composer 
bash
composer update shiftechafrica/smsales-php-sdk --lock
bash
composer dump-autoload
bash
php artisan vendor:publish --provider="SMSALES\SMSALEServiceProvider"

config/smsales.php