PHPackages                             bbnsms/sms-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. bbnsms/sms-api-client

ActivePackage

bbnsms/sms-api-client
=====================

A PHP package for sending sms over the bbn sms gateway

03PHP

Since Sep 1Pushed 4y ago1 watchersCompare

[ Source](https://github.com/bbnplace/bbnsms-api-client)[ Packagist](https://packagist.org/packages/bbnsms/sms-api-client)[ RSS](/packages/bbnsms-sms-api-client/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (2)Used By (0)

Introduction
------------

[](#introduction)

BBN SMS API Client is a simple library that powers your app to send sms notifications at transaction time. The setup is so simple it shouldn't take more than two(2) minutes to get up and running.

Pre-requisites
--------------

[](#pre-requisites)

1. Create a BBN SMS Account at  (Note: this will redirect to )
2. Login to bbnsms.com and register your Sender Names for Approval. (This is a regulatory step. Sender name approval may take 24 - 48 hours.) While you await the approval, let's proceed with the setup.

Setup
-----

[](#setup)

Before we begin, make sure you have downloaded and installed composer for your project. [See guide on how to install composer](https://https://getcomposer.org/doc/00-intro.md).

### 1. Install Package

[](#1-install-package)

You can add the bbnsms api client into your project by adding

```
"bbnsms/sms-api-client": "dev-master"

```

to your dependencies (the require attribute) of your composer.json file followed by running

```
composer install

```

on your terminal. Or you could simply run

```
composer require bbnsms/sms-api-client

```

on your terminal. This will install bbnsms-api-client and all it's dependencies into your vendor directory.

### 2. Setup Package

[](#2-setup-package)

Create a .bbnsms.json file in your app root directory. Add your BBN SMS login credentials (generated during pre-requisite step one) to the file as follows

```
{
    "access": {
        "credentials": {
            "username": "me@company.com",
            "password": "aWe$0mePas5word"
        }
    }
}

```

And that's all the setup! Surprised? Let's test the package.

Test the Library
----------------

[](#test-the-library)

Since we are working with composer, I am trusting somewhere in your project you have already autoloaded classes. BBN SMS API Client will autoload if you have done something like this at least in your entry script.

```
require_once __DIR__."/vendor/autoload.php";

```

\*\*\* If you are using a framework, that would have already been done for you.

At the top of your script or class file import **Bbnsms\\SMSClient** and create an instance of the SMSClient as as appropriate

```
use Bbnsms\SMSClient;

$smsclient = new SMSClient();

```

### Test your login credentials

[](#test-your-login-credentials)

```
printf("Valid Credentials: %s", $smsclient->testCredentials());

```

### Check your Balance

[](#check-your-balance)

```
printf("Balance: %.2f", $smsclient->getBalance());

```

### Send SMS to a Single Contact

[](#send-sms-to-a-single-contact)

To send message call the **send** method of the sms client as follows:

SMSClient-&gt;send(string message, string senderName, array recipients, bool flash=false): string

Example:

#### Send Inbox SMS

[](#send-inbox-sms)

```
printf("Send Response: %s", $smsclient->send("Sample Message", "APPROVED_SENDER_NAME", ["234818xxxxxxx"]));

```

#### Send Flash SMS

[](#send-flash-sms)

```
printf("Send Response: %s", $smsclient->send("Sample Message", "APPROVED_SENDER_NAME", ["234818xxxxxxx"], true));

```

### Send SMS to a Multiple Contacts

[](#send-sms-to-a-multiple-contacts)

```
printf("Send Response: %s", $smsclient->send("Hello", "APPROVED_SENDER_NAME", ["234818xxxxxxx","234909xxxxxxx"]));

```

### Scheduling Message

[](#scheduling-message)

Scheduled message will require two additional parameters: broadcastTime and scheduleName

```
SMSClient->schedule(int broadcastTime, string scheduleName, string message, string senderName, array recipients, bool flash=false): string

```

broadcastTime will be a UNIX\_TIMESTAMP value. Kind of timestamp you generate by simply calling php time().

Example:

#### Schedule Inbox SMS

[](#schedule-inbox-sms)

```
// printf("Scheduler Response: %s", $smsclient->schedule(time() + 60, "SchedTstr", "Hello", "APPROVED_SENDER_NAME", ["234818xxxxxxx"]));

```

#### Schedule Flash SMS

[](#schedule-flash-sms)

```
// printf("Scheduler Response: %s", $smsclient->schedule(time() + 60, "SchedTstr", "Hello", "APPROVED_SENDER_NAME", ["234818xxxxxxx"], true));

```

A successfully sent message will return 1801 as response. See full list of response codes and their meanings in the **API Response** section below.

API Responses
-------------

[](#api-responses)

Response CodeDefinition1800Request timeout1801Message successfully sent1802Invalid username1803Incorrect password1804Insufficient credit1805Invalid url submission1806Invalid mobile1807Invalid sender id1808Message too long1809Empty Message1901Schedule was successfully saved1902Scheduled broadcast time cannot be earlier than current time1903Invalid broadcast time1904Schedule name is too long. Maximum of 16 alphanumeric characters allowed1905Invalid value for notify me. 0 or 1 expected1906Incorrect Schedule Name. Schedule name may contain special character2001App ID does not exist2002Invalid App ID2003IP Lock Violation3001Recipient - Message ID mismatch. Number of recipients does not correlate with provided message idsImportant Note:
---------------

[](#important-note)

### Sender Names

[](#sender-names)

1. APPROVED\_SENDER\_NAME are sender names you have registered on bbnsms.com which has been confirmed approved
2. Sender names are eleven (11) alphanumeric character string.
3. Sender names must be the name, shortened name or acronymns of your business.

### Message

[](#message)

1. Messages cannot be longer than 765 characters (5 pages)
2. Pages are counted according to sms messaging standards as follows:
    1. A single page SMS will accept 160 characters
    2. The second page of sms only accomodates 146 characters
    3. Every other sms page accomodates 153 characters
3. A flash message is a message that pops-up on the receiving device to be read instantly and may not save to the receiving mobile phone Inbox.

If you would like to customize your integration, kindly refer to our [Integration Guide](https://dev.bbnplace.com/docs/).

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity30

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/e8e15033a01e656c054bc00cf6906c2aff6dd1a3548ea9990b71327b61bd8164?d=identicon)[bbnplace](/maintainers/bbnplace)

---

Top Contributors

[![bbnplace](https://avatars.githubusercontent.com/u/3621257?v=4)](https://github.com/bbnplace "bbnplace (7 commits)")

### Embed Badge

![Health badge](/badges/bbnsms-sms-api-client/health.svg)

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

PHPackages © 2026

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