PHPackages                             fromni-oy/notifications-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. [Mail &amp; Notifications](/categories/mail)
4. /
5. fromni-oy/notifications-sdk

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

fromni-oy/notifications-sdk
===========================

NOTIFICATIONS SDK

v1.0.0(9mo ago)00MITPHPPHP ^7.4 || ^8.0 || ^8.1

Since Sep 19Pushed 9mo agoCompare

[ Source](https://github.com/Fromni-oy/notifications-sdk)[ Packagist](https://packagist.org/packages/fromni-oy/notifications-sdk)[ Docs](https://github.com/fromni-oy/notifications-sdk)[ RSS](/packages/fromni-oy-notifications-sdk/feed)WikiDiscussions master Synced today

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

NOTIFICATIONS SDK
=================

[](#notifications-sdk)

[![Latest Version on Packagist](https://camo.githubusercontent.com/26e262fd7fecc7b21fa5113f29131f2dfbda644da51d66ba6f6c158cbe6ba3db/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f66726f6d6e692d6f792f6e6f74696669636174696f6e732d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fromni-oy/notifications-sdk)[![Tests](https://camo.githubusercontent.com/a651404de203c73d08add93c2bd8fa2167f9dbf49d1af57d7c34377c4b9d767e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f66726f6d6e692d6f792f6e6f74696669636174696f6e732d73646b2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/fromni-oy/notifications-sdk/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/f96374a751c3793dac450729317b9236b00848b70481e563f7d902384c4033af/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f66726f6d6e692d6f792f6e6f74696669636174696f6e732d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fromni-oy/notifications-sdk)

Library for sending messages via services notifications.fromni.com

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

[](#installation)

You can install the package using composer:

```
composer require fromni-oy/notifications-sdk
```

Usage
-----

[](#usage)

The sandbox mode is activated with its own token before creating a client:

```
$sandboxApiKey = '...';
$sandbox = Nexus\Message\Sdk\Client::enableSandbox($sandboxApiKey);
```

Checking the sandbox activity:

```
$activated = $sandbox->active();
```

Disable the sandbox:

```
Nexus\Message\Sdk\Client::disableSandbox();
```

Creating a client with an access key:

```
use Nexus\Message\Sdk\Exceptions\CollectionException;
use Nexus\Message\Sdk\Exceptions\ConnectionException;
use Nexus\Message\Sdk\Exceptions\HttpInvalidArgumentException;
use Nexus\Message\Sdk\Exceptions\LowBalanceException;
use Nexus\Message\Sdk\Exceptions\TokenException;
use Nexus\Message\Sdk\Exceptions\ViolationIntegrityEntityException;

try {
    $apiKey = '...';
    $client = new Nexus\Message\Sdk\Client($apiKey);
    $login = $client->getLogin();
} catch (CollectionException $exception) {
    echo 'CollectionException: ' . $exception->getMessage();
} catch (ConnectionException $exception) {
    echo 'ConnectionException: ' . $exception->getMessage();
} catch (HttpInvalidArgumentException $exception) {
    echo 'HttpInvalidArgumentException: ' . $exception->getMessage();
} catch (TokenException $exception) {
    echo 'TokenException: ' . $exception->getMessage();
} catch (LowBalanceException $exception) {
    echo 'LowBalanceException: ' . $exception->getMessage();
} catch (ViolationIntegrityEntityException $exception) {
    echo 'ViolationIntegrityEntityException: ' . $exception->getMessage();
} catch (\InvalidArgumentException $exception) {
    echo 'InvalidArgumentException: ' . $exception->getMessage();
} catch (\Exception $exception) {
    echo 'Exception: ' . $exception->getMessage();
}
```

Balance:

```
$balance = $client->getBalance();
```

Checking phone numbers:

```
$collection = $client->checkPhones(['358451086128', '...']);

if ($collection->count() > 0) {
    foreach ($collection as $phone) {
        $checked = $phone->checked();
        $valid = $phone->valid();
        $phoneNumber = $phone->getNumber();
        $country = $phone->getCountry();
        $operator = $phone->getOperator();
        $regionId = $phone->getRegionId();
        $regionName = $phone->getRegionName();
        $timezone = $phone->getTimezone();
    }
}
```

List of senders names:

```
$collection = $client->getSenders();

if ($collection->count() > 0) {
    foreach ($collection as $sender) {
        $checked = $sender->checked();
        $senderName = $sender->getSender();
        $channel = $sender->getChannel();
    }
}
```

### Sending messages:

[](#sending-messages)

Before sending messages, you need to create metadata for working with statuses:

```
$reportUrl = 'https://example.com/report'; // Message statuses and sending errors will be sent to this URL.
$replyUrl = 'https://example.com/reply'; // Responses to messages will be sent to this URL if the channel supports this functionality.
$metadata = Nexus\Message\Sdk\ValueObject\MessageMetadata::create($reportUrl, $replyUrl, 600);
```

Sending confirmation codes to Telegram:

```
$client->sendTelegram(['358451086128', '...'], 'Message text', $metadata);
```

Sending via Viber channel:

```
$client->sendViber(['358451086128', '...'], 'Message text', $metadata);
```

Sending via SMS channel:

```
$client->sendSms(['358451086128', '...'], 'Message text', $metadata);
```

Sending by default channels:

```
$client->sendSimple(['358451086128', '...'], 'Message text', $metadata);
```

Omnichannel sending:

```
$channels = ['telegram', 'viber', 'sms']; // The order of channels to send
$client->sendHybrid(['358451086128', '...'], 'Message text', $channels, $metadata);
```

### Handling statuses, reply and errors:

[](#handling-statuses-reply-and-errors)

Handling statuses and errors:

```
$post = file_get_contents('php://input');
$handler = Nexus\Message\Sdk\Client::statusHandler($post);
$error = $handler->getError();
$messageId = $handler->getEntityId();
$status = $handler->getStatus();
$channel = $handler->getChannel();
```

Reply processing:

```
$post = file_get_contents('php://input');
$handler = Nexus\Message\Sdk\Client::replyHandler($post);
$messageId = $handler->getMessageId();
$customId = $handler->getCustomId();
$text = $handler->getText();
$date = $handler->getDate();
```

Testing
-------

[](#testing)

```
phpunit --coverage-text
```

History of changes
------------------

[](#history-of-changes)

See [CHANGELOG](CHANGELOG.md) for more information about what has changed recently.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance57

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

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

Unknown

Total

1

Last Release

287d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/105853799?v=4)[ronlx](/maintainers/ronlx)[@ronlx](https://github.com/ronlx)

---

Top Contributors

[![bot](https://avatars.githubusercontent.com/u/58210622?v=4)](https://github.com/bot "bot (3 commits)")

---

Tags

fromni-oynotifications-sdk

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fromni-oy-notifications-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/fromni-oy-notifications-sdk/health.svg)](https://phpackages.com/packages/fromni-oy-notifications-sdk)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[pantheon-systems/terminus

A command line interface for Pantheon

3391.5M18](/packages/pantheon-systems-terminus)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)

PHPackages © 2026

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