PHP code example of messagebird / php-rest-api

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

    

messagebird / php-rest-api example snippets




$messageBird = new \MessageBird\Client('YOUR_ACCESS_KEY');


// Get your balance
$balance = $messageBird->balance->read();

$messageBird = new \MessageBird\Client('YOUR_ACCESS_KEY', null, [\MessageBird\Client::ENABLE_CONVERSATIONSAPI_WHATSAPP_SANDBOX]);