PHPackages                             isurindu/rest-api-client - 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. [API Development](/categories/api)
4. /
5. isurindu/rest-api-client

AbandonedLibrary[API Development](/categories/api)

isurindu/rest-api-client
========================

Wrapper for SMSGlobal's REST API v2

2.4(8y ago)187MITPHPPHP &gt;=5.3.0

Since Feb 27Pushed 8y ago1 watchersCompare

[ Source](https://github.com/isurindu/rest-api-client-php)[ Packagist](https://packagist.org/packages/isurindu/rest-api-client)[ Docs](http://www.smsglobal.com/)[ RSS](/packages/isurindu-rest-api-client/feed)WikiDiscussions dev-v2 Synced 3d ago

READMEChangelog (4)Dependencies (2)Versions (6)Used By (0)

REST API v2 . More information at
----------------------------------------------------------------------------

[](#rest-api-v2--more-information-at-httpshssmsglobalcomservices-update)

SMSGlobal Class Library for PHP
===============================

[](#smsglobal-class-library-for-php)

This is a wrapper for the [SMSGlobal](http://www.smsglobal.com/) REST API. Get an API key from SMSGlobal by signing up and viewing the API key page in the MXT platform.

View the [REST API documentation](http://www.smsglobal.com/rest-api/) for a list of available resources.

Quick Start
-----------

[](#quick-start)

This wrapper is requires PHP 5.3 or greater, and either the cURL library or the HTTP stream wrapper to be installed and enabled.

To install, add the dependency to your `composer.json` file:

```
{
    "require": {
        "smsglobal/rest-api-client": "*"
    }
}
```

And install with Composer.

```
$ cd path/to/your/project
$ composer install --no-dev
```

Not using Composer?
-------------------

[](#not-using-composer)

You can install the library by downloading it from Github. Just use a PSR-0 compliant autoloader to load in the classes.

To run unit tests or generate documentation, you'll need PHPUnit and phpDocumentor.

Running Unit Tests
------------------

[](#running-unit-tests)

```
$ cd path/to/SMSGlobal/rest/api/client
$ composer install
$ phpunit
```

Get documentation
-----------------

[](#get-documentation)

Documentation is available on [the SMSGlobal website](http://www.smsglobal.com/docs/rest-api-client-php/), or you can generate it yourself:

```
$ cd path/to/SMSGlobal/rest/api/client
$ composer install
$ vendor/phpdocumentor/phpdocumentor/bin/phpdoc.php -c phpdoc.xml
```

Using the library
-----------------

[](#using-the-library)

Running Unit Tests

```
// Include the Composer autoloader or use your own PSR-0 autoloader
require 'vendor/autoload.php';

use Smsglobal\RestApiClient\ApiKey;
use Smsglobal\RestApiClient\Resource\Sms;
use Smsglobal\RestApiClient\RestApiClient;

// Get an API key from SMSGlobal and insert the key and secret
$apiKey = new ApiKey('your-api-key', 'your-api-secret');

// All requests are done via a 'REST API client.' This abstracts away the REST
// API so you can deal with it like you would an ORM
$rest = new RestApiClient($apiKey);

// Now you can get objects
$contact = $rest->get('contact', 1); // Contact resource with ID = 1
// Edit them
$contact->setMsisdn('61447100250');
// And save them
$rest->save($contact);
// Or delete them
$rest->delete($contact);

// You can also instantiate new resources
$sms = new Sms();
$sms->setDestination('61447100250')
    ->setOrigin('Test')
    ->setMessage('Hello World');
// And save them
$rest->save($sms);
// When a new object is saved, the ID gets populated (it was null before)
echo $sms->getId(); // integer

// For an SMS, saving also sends the message, so you can use a more meaningful
// keyword for it
$sms->send($rest);

// You can get a list of available resources
$list = $rest->getList('sms');

foreach ($list->objects as $resource) {
    // ...
}

// Pagination data is included
echo $list->meta->getTotalPages(); // integer

// Lists can be filtered
// e.g. contacts belonging to group ID 1
$rest->getList('contact', 0, 20, array('group' => 1));
```

Notes
-----

[](#notes)

1. Requesting the same object twice in one session will return the same instance (even in the resource lists)
2. Exceptions are thrown if you attempt to save an object with invalid data

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 62.5% 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 ~0 days

Total

4

Last Release

2999d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f7382e2664836df4b59e1806d76a9920d3c796ea12355ab6cd0341ca513e4e15?d=identicon)[isurindu](/maintainers/isurindu)

---

Top Contributors

[![isurindu](https://avatars.githubusercontent.com/u/10331730?v=4)](https://github.com/isurindu "isurindu (5 commits)")[![phradion](https://avatars.githubusercontent.com/u/965536?v=4)](https://github.com/phradion "phradion (2 commits)")[![choiceforyou](https://avatars.githubusercontent.com/u/1298665?v=4)](https://github.com/choiceforyou "choiceforyou (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/isurindu-rest-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/isurindu-rest-api-client/health.svg)](https://phpackages.com/packages/isurindu-rest-api-client)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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