PHPackages                             by-zer0/sms-assistant-php - 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. by-zer0/sms-assistant-php

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

by-zer0/sms-assistant-php
=========================

PHP library for using sms-assistent.by HTTP API

1.2(9y ago)14.6k↑66.7%1MITPHP

Since Sep 24Pushed 9y ago1 watchersCompare

[ Source](https://github.com/ByZer0/sms-assistant-php)[ Packagist](https://packagist.org/packages/by-zer0/sms-assistant-php)[ Docs](https://github.com/ByZer0/sms-assistant-php)[ RSS](/packages/by-zer0-sms-assistant-php/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

[![StyleCI](https://camo.githubusercontent.com/d92249347fa1764ce917dd0a45ddce627b4bf7c2755e2c8e337aec119d7c5c85/68747470733a2f2f7374796c6563692e696f2f7265706f732f36393039303537302f736869656c643f7374796c653d666c6174)](https://styleci.io/repos/69090570)

sms-assistent.by API PHP wrapper
================================

[](#sms-assistentby-api-php-wrapper)

This library can be used to send messages via [sms-assistent.by](http://sms-assistent.by) site.

More info about API can be found [here](http://help.sms-assistent.by/sms-rassyilka/rassylka-po-api/).

Installation
============

[](#installation)

Add following requirement to your `composer.json` file:

```
{
    "require": {
        "by-zer0/sms-assistant-php": "1.2"
    }
}
```

or just use composer command

```
composer require by-zer0/sms-assistant-php:1.2
```

Usage
=====

[](#usage)

First create client instance.

```
require 'vendor/autoload.php';

use ByZer0\SmsAssistantBy\Client;
use ByZer0\SmsAssistantBy\Http\GuzzleClient;

$client = (new Client(new GuzzleClient()))
    ->setUsername('') // Set username to pass API authorization.
    ->setSender('') // Set default sender name.
    ->setPassword(''); // Set account password to pass API authorization.
//    ->setToken(''); // Optional, set access token instead of password.
```

Constructor accepts `ByZer0\SmsAssistantBy\Http\ClientInterface` instance. This instance will be actually used to perform HTTP requests. By default, package contains `ByZer0\SmsAssistantBy\Http\GuzzleClient` class - request wrapper for `guzzlehttp/guzzle` library. You can write your own implementation of `ByZer0\SmsAssistantBy\Http\ClientInterface` to use with any other library.

Execute following command if you want to use default guzzle adapter:

```
composer require guzzlehttp/guzzle
```

Massive sending
---------------

[](#massive-sending)

Use method `sendMessages($messages, $default = [], $time = null)` to send multiple messages at once.

```
$default = [
    'sender' => '',
    'text' => 'This is default message text',
];

$messages = [
    [
        'phone' => '+375294011111',
        'sender' => 'notdefault',
        'text' => 'Message for first recipient',
    ],
    [
        'phone' => '+375294022222', // default sender name and text will be used
    ],
];

$client->sendMessages($messages, $default);
```

in this case `$default` represents common settings for each message. Default message can contain next fields:

- `sender` - to use one sender name for every message
- `text` - common text can be placed here to avoid duplicate in every message

Every message must contain one required field:

- `phone` - phone number of message recipient.

In addition to `phone`, every default value can be overwritten in any message.

You can also use third parameter of `sendMessages()` to delay send. Third parameter `$time` accepts `DateTime` instance.

Single message
--------------

[](#single-message)

Use method `sendMessage($phone, $text, $time = null, $sender = null)` to send single message.

```
$client->sendMessage('+375294011111', 'Example message text');
```

This method accepts up to four parameters:

- `phone` - Phone number of message recipient.
- `text` - Message text.
- `time` - `DateTime` instance. Use to delay message delivery.
- `sender` - Sender name. If used, this name will override default value specified by `setSender()` method.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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 ~47 days

Total

3

Last Release

3475d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/283718?v=4)[Matteo Ferretti](/maintainers/Zer0)[@ZER0](https://github.com/ZER0)

---

Top Contributors

[![ByZer0](https://avatars.githubusercontent.com/u/12472209?v=4)](https://github.com/ByZer0 "ByZer0 (19 commits)")

### Embed Badge

![Health badge](/badges/by-zer0-sms-assistant-php/health.svg)

```
[![Health](https://phpackages.com/badges/by-zer0-sms-assistant-php/health.svg)](https://phpackages.com/packages/by-zer0-sms-assistant-php)
```

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M82](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k24.3k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k114](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.4M92](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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