Silverstreet API Client for PHP

v3.2.0 2020-03-29 05:43 UTC

This package is auto-updated.

Last update: 2020-11-15 03:16:42 UTC


tests Latest Stable Version Total Downloads Latest Unstable Version License


To install through composer, simply put the following in your composer.json file:

    "require": {
        "katsana/silverstreet": "^3.0",
        "php-http/guzzle6-adapter": "^2.0"

HTTP Adapter

Instead of utilizing php-http/guzzle6-adapter you might want to use any other adapter that implements php-http/client-implementation. Check Clients & Adapters for PHP-HTTP.


Creating Silverstreet Client

You can start by creating a client by using the following code (which uses php-http/guzzle6-adapter):


use Silverstreet\Client;

$http = Laravie\Codex\Discovery::client();

$silverstreet = new Client($http, 'your-api-username', 'your-api-password');

You could also use php-http/discovery to automatically pick available adapter installed via composer:


use Silverstreet\Client;

$silverstreet = Client::make('your-api-username', 'your-api-password');

Sending Text Messages

You can send text messages by running the following code.

    ->text('Hello world', '+60123456789', $sender);

Checking Credit Balance

You can request for available balance by running the following code.

$balance = $silverstreet->uses('Credit')->available();

echo $balance; // 400