PHPackages                             adresser/smsbot-sdk - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. adresser/smsbot-sdk

AbandonedArchivedComposer-plugin[Utility &amp; Helpers](/categories/utility)

adresser/smsbot-sdk
===================

Easy to use SDK for smsbot platform

0.0.1(5y ago)301MITPHP

Since Sep 14Pushed 5y ago1 watchersCompare

[ Source](https://github.com/adresser/smsbot-sdk)[ Packagist](https://packagist.org/packages/adresser/smsbot-sdk)[ RSS](/packages/adresser-smsbot-sdk/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

smsbot-php-sdk
==============

[](#smsbot-php-sdk)

[![Actions Status](https://github.com/adresser/smsbot-sdk/workflows/PHP%20Composer/badge.svg)](https://github.com/adresser/smsbot-sdk/actions) [![LICENSE](https://camo.githubusercontent.com/be80b8cb211ceb2263744e99fdb161a40124901906fd7c7f47d6361760dd7e8b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d416e74692532303939362d626c75652e737667)](https://github.com/996icu/996.ICU/blob/master/LICENSE) [![Packagist](https://camo.githubusercontent.com/6f258ec5a9c578bd020797126890ac38e306bac19ac6c8eb67b70933687c817f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61647265737365722f736d73626f742d73646b2e737667)](https://packagist.org/packages/adresser/smsbot-sdk)

🚀An **easy-to-use** Software Development Kit made in PHP for communicating with the Smsbot API.

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

[](#installation)

Download the repository or get it via Composer (recommended):

```
$ composer require adresser/smsbot-sdk
```

Versions
--------

[](#versions)

This package uses [semver](https://semver.org/).

### Supported PHP Versions

[](#supported-php-versions)

This library supports the following PHP implementations:

- PHP 7.2
- PHP 7.3
- PHP 7.4

Quickstart
----------

[](#quickstart)

- Sign up on the [smsbot](https://sms.smsbot.it) platform
- Get your authentication key (find it on Settings section)
- To send SMSs using your device, connect the device and get the **device id** and the **SIM id**
- To send SMSs using the HTTP gateway, make a **sender ID** (go on Sender ids section)

Include the *vendor/autoload.php* file to load all the library classes.

The **Smsbot** facade provides an ingress to the SDK. However, you can use the internal classes at your convenience.

#### Valid phone number pattern

[](#valid-phone-number-pattern)

The phone number must follow this pattern:

```
+(prefix)(number) // es: +13334445566

```

#### Send an SMS through the HTTP Gateway

[](#send-an-sms-through-the-http-gateway)

> Notes: To send a **bulk sms** add more destination using the *pushDestination* method.

```
use Adresser\Smsbot\Sms;
use Adresser\Smsbot\Facade\Smsbot;

Smsbot::setAuthenticationKey('set the authentication key');

$clientFactory = Smsbot::getSmsClientFactory();

$client = $clientFactory->getClient('http');
$client->setSenderId('put the sender id');

// in future this will no longer be needed
$client->setCountryId('put the country code');

$sms = new Sms('test message!');
$sms->pushDestination('+39xxxxxxxxxx');

$client->send($sms);
```

#### Send an SMS through the registered device

[](#send-an-sms-through-the-registered-device)

> Notes: To send a **bulk sms** add more destination using the *pushDestination* method.

```
use Adresser\Smsbot\Sms;
use Adresser\Smsbot\Facade\Smsbot;

Smsbot::setAuthenticationKey('set the authentication key');

$clientFactory = Smsbot::getSmsClientFactory();
$client = $clientFactory->getClient('device');

$client->setDeviceId('put the device id here');
$client->setSimId('put the sim id here');

$sms = new Sms('test message!');
$sms->pushDestination('+39xxxxxxxxxx');

$client->send($sms);
```

#### Generate an OTP

[](#generate-an-otp)

```
use Adresser\Smsbot\Facade\Smsbot;

Smsbot::setAuthenticationKey('set the authentication key');
$factory = Smsbot::getOtpFactory();

$generator = $factory->getOtpGenerator();
$validator = $factory->getOtpValidator();

// set the One Time Password lifetime in seconds
$otp = $generator->generate(3600);

// the otp will be store inside the smsbot system
if ($validator->validate($otp)) {
    echo "The OTP is valid! \n";
}
```

#### Using a custom http client

[](#using-a-custom-http-client)

The custom http client must implement the [Psr\\Http\\Client\\ClientInterface](https://www.php-fig.org/psr/psr-18/).

```
$customHttpClient = new CustomHttpClient();

$requestDispatcher = new Adresser\Smsbot\RequestDispatcher('auth key', $customHttpClient);

// same with other types of sms clients
$deviceSmsClient = new Adresser\Smsbot\DeviceSmsClient($requestDispatcher);
```

#### Getting help

[](#getting-help)

For any question or problem, we suggest to open an issue!

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~2 days

Total

2

Last Release

2064d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1196440?v=4)[xplodwil](/maintainers/Charlemagne)[@charlemagne](https://github.com/charlemagne)

---

Top Contributors

[![LemuelPuglisi](https://avatars.githubusercontent.com/u/42694683?v=4)](https://github.com/LemuelPuglisi "LemuelPuglisi (23 commits)")

---

Tags

otpsms

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/adresser-smsbot-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/adresser-smsbot-sdk/health.svg)](https://phpackages.com/packages/adresser-smsbot-sdk)
```

###  Alternatives

[illuminate/config

The Illuminate Config package.

10842.7M2.2k](/packages/illuminate-config)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[glhd/conveyor-belt

14797.0k](/packages/glhd-conveyor-belt)[illuminate/redis

The Illuminate Redis package.

8314.0M314](/packages/illuminate-redis)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[illuminate/cookie

The Illuminate Cookie package.

224.3M122](/packages/illuminate-cookie)

PHPackages © 2026

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