PHP SDK for Orange APIs Client with Token Caching

v1.0.1 2021-12-05 17:35 UTC

This package is auto-updated.

Last update: 2023-03-01 00:46:36 UTC


Orange APIs Client with Token Caching


You need to have composer installed in your computer before doing this

composer require enigma972/orange-api-client

Quick setup and Basic example (SMS)

Get client_id and client_secret here

All examples here

require_once './../../vendor/autoload.php';

use OrangeApiClient\Service\Sms\Sms;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use OrangeApiClient\Client;
use OrangeApiClient\Service\Sms\Message;

$cache = new FilesystemAdapter();
$client = new Client($cache, 'YOUR-CLIENT-ID', 'YOUR-CLIENT-SECRET');

$sms = new Sms($client);

$message = new Message();
    ->content('Hello world, via Orange SMS API.')

$response = $sms->doSend($message);


If all is ok, $response should be like this :

^ array:1 [▼
  "outboundSMSMessageRequest" => array:4 [▼
    "address" => array:1 [▼
      0 => "tel:+243899999999"
    "senderAddress" => "tel:+243899999999"
    "outboundSMSTextMessage" => array:1 [▼
      "message" => "Hello world, via Orange SMS API."
    "resourceURL" => "https://api.orange.com/smsmessaging/v1/outbound/tel:+243899999999/requests/2fdd2d6e-c155-43d3-97ef-1dce0dc648d5"

Also read ismaeltoe/osms and informagenie/orange-sms.