PHP code example of wasolution / api-client

1. Go to this page and download the library: Download wasolution/api-client 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/ */

    

wasolution / api-client example snippets


use WASolution\WAClient;

// Initialize the client with your credentials
$client = new WAClient(
    'your-app-key',    // Get this from your WASolution dashboard
    'your-auth-key'    // Get this from your WASolution dashboard
);

// Send a message
try {
    $response = $client->sendMessage(
        '60123456789',     // Recipient's phone number
        'Hello from PHP!'   // Your message
    );
    print_r($response);
} catch (\Exception $e) {
    echo "Error: " . $e->getMessage();
}