PHPackages                             donzo24/orange-sms - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. donzo24/orange-sms

ActiveLibrary[HTTP &amp; Networking](/categories/http)

donzo24/orange-sms
==================

A php library to interact with the orange sms api for MiddleEast and Africa.

131PHP

Since Feb 27Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Donzo24/orange-sms)[ Packagist](https://packagist.org/packages/donzo24/orange-sms)[ RSS](/packages/donzo24-orange-sms/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

orange-sms
==========

[](#orange-sms)

[![Build Status](https://camo.githubusercontent.com/c7179089a660a3f0e6b9d197311717fde03faf51ea3fbca4af7b89ed9b2aa48b/68747470733a2f2f7472617669732d63692e6f72672f446f6e7a6f32342f6f72616e67652d736d732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Donzo24/orange-sms)[![Code Coverage](https://camo.githubusercontent.com/95f56d4d2014542f70c4869075a00edde66c57094e6667807fca72917a531999/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f446f6e7a6f32342f6f72616e67652d736d732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Donzo24/orange-sms/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/ca42b66e28ac077a89c59746440e22831880113b9c7fdf9bce87a44749798242/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f446f6e7a6f32342f6f72616e67652d736d732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Donzo24/orange-sms/?branch=master)

Description
-----------

[](#description)

A php library to interact with the orange sms api for MiddleEast and Africa.

Installation
------------

[](#installation)

Using composer:

```
$ composer require donzo24/orange-sms

```

Usage
-----

[](#usage)

First you need to resolve a `SMSClient` instance:

```
use Donzo24\Orange\SMS\SMS;
use Donzo24\Orange\SMS\Http\SMSClient;

/**
* if you already have a valid access token
* */
$client = SMSClient::getInstance('');

// OR

/**
* directly using  and
* */
$client = SMSClient::getInstance('', '');
```

next step, create an `SMS` object passing it the `$client` :

```
$sms = new SMS($client);
```

and you're good to go:

```
// prepare and send an sms in a fluent way
$sms->message('Hello, my dear...')
    ->from('+237690000000')
    ->to('+237670000000')
    ->send();
```

You now have access to the full orange sms api through the `$sms` object :

```
// sending SMS.
$response = $sms->to('+237670000000')
                ->from('+237690000000', message('Hello, world!')
                ->send();

// checking your balance(remaining sms units)
// with optional country code filter ie: CIV
$response = $sms->balance('');

// checking SMS orders history
// with optional country code filter ie: CMR
$response = $sms->ordersHistory('');

// checking SMS statistics
// with optional country code filter
// and optional appID filter
$response = $sms->statistics('', '');

// setting the SMS DR notification endpoint
// '' $url
// '' $sender = '+237690000000'
$response = $sms->setDeliveryReceiptNotificationUrl($url, $sender);

// checking the SMS DR notification endpoint
// '' $id
$response = $sms->checkDeliveryReceiptNotificationUrl($id);

// delete the SMS DR notification endpoint
// '' $id
// '' $sender = '+237690000000'
$response = $sms->deleteDeliveryReceiptNotificationUrl($id, $sender);
```

All `json` responses will automatically be converted to `array`.

Be sure to lookup [the official documentation](https://developer.orange.com/apis/sms-cm/getting-started), to see what to expect as a `response` to each call.

Access Token
------------

[](#access-token)

When you resolve the `SMSClient` instance using your `client_id` and `client_secret`, a new access token will be fetched from the api server and automatically set on the instance, along with its lifetime in seconds.

We recommend saving the token (*maybe to your database*) for future use, at least within the limit of its validity period. this will help speed up requests to the api.

Use the `getToken()` and `getTokenExpiresIn()` to get those values from the instance:

```
use Donzo24\Orange\SMS\Http\SMSClient;

$client = SMSClient::getInstance('', '');

// get the token
$token = $client->getToken();

// get the token lifetime in seconds
$tokenExpiresIn = $client->getTokenExpiresIn();
```

If you wish, you can also fetch your access token directly without resolving a client instance, using the static `authorize` method:

```
$response = SMSClient::authorize('', '');
```

this will return as `$response`, an array of this form:

```
[
 "token_type" => "Bearer",
 "access_token" => "i6m2iIcY0SodWSe...L3ojAXXrH",
 "expires_in" => "7776000"
]
```

SSL Certificate check issue
---------------------------

[](#ssl-certificate-check-issue)

If you experience ssl certificate checking issue, in your local environment. You can disable the check temporarily with the following line, before starting to interact with the api in your code.

Just for testing purposes though. You should never do this on a production server.

```
\Donzo24\Orange\SMS\Http\SMSClientRequest::verify(false);
```

License
-------

[](#license)

Donzo24 orange-sms is an open-sourced software licensed under the [MIT license](https://github.com/Donzo24/orange-sms/blob/master/LICENSE.txt).

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5f5050c6efb41dc97bd1a8ed7ef87c295e951dbbd3445d2f5c5c2f3f7fafa7fa?d=identicon)[Donzo24](/maintainers/Donzo24)

---

Top Contributors

[![Donzo24](https://avatars.githubusercontent.com/u/11745073?v=4)](https://github.com/Donzo24 "Donzo24 (2 commits)")

### Embed Badge

![Health badge](/badges/donzo24-orange-sms/health.svg)

```
[![Health](https://phpackages.com/badges/donzo24-orange-sms/health.svg)](https://phpackages.com/packages/donzo24-orange-sms)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M316](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M292](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
