PHP code example of akamomer / bulksmsiraq-sdk-v4

1. Go to this page and download the library: Download akamomer/bulksmsiraq-sdk-v4 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/ */

    

akamomer / bulksmsiraq-sdk-v4 example snippets




BulkSMSIraq\BulkSMSIraqV4;;

// Replace 'YOUR_API_KEY_HERE' with your actual API key
//API KEY: https://portal.verifyway.com/developers

$apiKey = 'API_KEY';
$smsClient = new BulkSMSIraqV4($apiKey);

$recipientNumber = '9647xxxxxxxxx';
//replace with your SenderID
//https://portal.verifyway.com/senderid
$senderId = 'SenderID';

try {

    // Example 2: Sending a WhatsApp OTP message in Arabic
    echo "\nSending WhatsApp message in Arabic...\n";
    $whatsappResponse = $smsClient->sendWhatsAppArabic(
        $recipientNumber,
        $senderId,
        '123654'
    );
    print_r($whatsappResponse);
   
} catch (\Exception $e) {
    echo "An error occurred: " . $e->getMessage() . "\n";
}