PHP code example of telstra / messagingapi-sdk-php

1. Go to this page and download the library: Download telstra/messagingapi-sdk-php 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/ */

    

telstra / messagingapi-sdk-php example snippets


    


Instance = new Telstra_Messaging\Api\AuthenticationApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$client_id = 'client_id_example'; // string | 
$client_secret = 'client_secret_example'; // string | 
$grant_type = 'client_credentials'; // string | 

try {
    $result = $apiInstance->authToken($client_id, $client_secret, $grant_type);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AuthenticationApi->authToken: ', $e->getMessage(), PHP_EOL;
}


{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/Telstra/MessagingAPI-SDK-php.git"
    }
  ],
  "