PHPackages                             mediumart/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. mediumart/orange-sms

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

mediumart/orange-sms
====================

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

2.0.0(4y ago)1311.1k↓50%111MITPHPPHP &gt;= 5.6

Since Mar 25Pushed 4y ago1 watchersCompare

[ Source](https://github.com/mediumart/orange-sms)[ Packagist](https://packagist.org/packages/mediumart/orange-sms)[ RSS](/packages/mediumart-orange-sms/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (8)Used By (1)

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

[](#orange-sms)

[![Build Status](https://camo.githubusercontent.com/fbd08287193f2962b064867f17a63e8475ac88f9dd0ccb8c56f550ac48103a57/68747470733a2f2f7472617669732d63692e6f72672f6d656469756d6172742f6f72616e67652d736d732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mediumart/orange-sms)[![Code Coverage](https://camo.githubusercontent.com/90a1c79283e39143ce7d74122a0ff9fac7951534201042dad7b143a0d9442b01/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d656469756d6172742f6f72616e67652d736d732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mediumart/orange-sms/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/4f439f16f3c901be8b85dbe8149f443e5b95866b79a9215bd1570302fea395ba/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d656469756d6172742f6f72616e67652d736d732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mediumart/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 mediumart/orange-sms

```

Usage
-----

[](#usage)

First you need to resolve a `SMSClient` instance:

```
use Mediumart\Orange\SMS\SMS;
use Mediumart\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 Mediumart\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.

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

License
-------

[](#license)

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

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 90% 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.

###  Release Activity

Cadence

Every ~289 days

Recently: every ~410 days

Total

7

Last Release

1604d ago

Major Versions

1.1.3 → 2.0.02021-12-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/76d279b09dcc42437866a38f691f12719533b305de249bdde754a1f453939fc2?d=identicon)[isaacesso](/maintainers/isaacesso)

---

Top Contributors

[![isaacesso](https://avatars.githubusercontent.com/u/6454100?v=4)](https://github.com/isaacesso "isaacesso (36 commits)")[![MuluhGodson](https://avatars.githubusercontent.com/u/40151808?v=4)](https://github.com/MuluhGodson "MuluhGodson (4 commits)")

---

Tags

orangeorange-apiphpsmssmsorangeorange-api

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[infobip/infobip-api-php-client

PHP library for consuming Infobip's API

921.8M10](/packages/infobip-infobip-api-php-client)[ismaeltoe/osms

PHP library wrapper of the Orange SMS API.

4540.0k](/packages/ismaeltoe-osms)[minchao/every8d-php

A EVERY8D SMS SDK for PHP (Unofficial)

1239.9k1](/packages/minchao-every8d-php)[ender/yunpian-sms

A php SDK for yunpian(云片网络短信服务商) sms RESTFULL API

294.9k](/packages/ender-yunpian-sms)

PHPackages © 2026

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