PHPackages                             helliosolutions/helliosms - 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. [API Development](/categories/api)
4. /
5. helliosolutions/helliosms

ActiveLibrary[API Development](/categories/api)

helliosolutions/helliosms
=========================

Official Laravel SDK for the Hellio Messaging API v1 (SMS, OTP, Voice, Number Lookup, Email Verification, USSD, Webhooks).

v2.2.0(1mo ago)331MITPHPPHP ^8.0CI failing

Since Jul 5Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/HellioSolutions/helliosms)[ Packagist](https://packagist.org/packages/helliosolutions/helliosms)[ RSS](/packages/helliosolutions-helliosms/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (10)Versions (5)Used By (0)

Hellio Messaging — Official Laravel SDK
=======================================

[](#hellio-messaging--official-laravel-sdk)

[![tests](https://github.com/HellioSolutions/helliosms/actions/workflows/tests.yml/badge.svg)](https://github.com/HellioSolutions/helliosms/actions/workflows/tests.yml)[![Latest Version](https://camo.githubusercontent.com/e046ac2de60ba2cc22c274ddb675fa82a870218f1bee15eb86f5a953ceda618e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68656c6c696f736f6c7574696f6e732f68656c6c696f736d732e737667)](https://packagist.org/packages/helliosolutions/helliosms)[![Total Downloads](https://camo.githubusercontent.com/dfbff4aa95a3a3b724f0e1a20a17afdcadbe6e73b910b9781a8a2b1c8b0f4684/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68656c6c696f736f6c7574696f6e732f68656c6c696f736d732e737667)](https://packagist.org/packages/helliosolutions/helliosms)[![License](https://camo.githubusercontent.com/81c2f8aceba2564131dbee559a65c65143f91ebe9b777339faf4d7d9f13513a7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f68656c6c696f736f6c7574696f6e732f68656c6c696f736d732e737667)](LICENSE)

Laravel client for the [Hellio Messaging](https://helliomessaging.com) API v1: **SMS**, **OTP** (SMS / voice / WhatsApp / email), **Voice broadcasts**, **Number Lookup (HLR)**, **Email Verification**, **USSD**, **Webhooks**, plus a Laravel **notification channel** and a **validation rule**.

Install
-------

[](#install)

```
composer require helliosolutions/helliosms
```

Publish the config (optional):

```
php artisan vendor:publish --tag=helliomessaging
```

Configure
---------

[](#configure)

Generate a token in your dashboard → **Settings → API → Generate API token**, then set:

```
HELLIO_BASE_URL=https://api.helliomessaging.com/v1
HELLIO_API_TOKEN=your-token-here
HELLIO_DEFAULT_SENDER=HellioSMS
```

Usage
-----

[](#usage)

Resolve the client from the container or use the `HellioMessaging` facade.

```
use Hellio\HellioMessaging\Facades\HellioMessaging;

// Account
HellioMessaging::balance();            // ['data' => ['balance' => '195.0000', 'available' => '194.65', ...]]
HellioMessaging::pricing('GH');        // optional ISO-2 country filter

// SMS (recipients: string, comma list, or array)
HellioMessaging::sms('233241234567', 'Hello!');
HellioMessaging::sms(['233241234567', '233201234567'], 'Hi all', 'HellioSMS');
HellioMessaging::message(1024);        // delivery status
HellioMessaging::campaign(1024);       // campaign summary

// OTP — sender (Sender ID) is REQUIRED for sms/voice and must be approved on your account.
// Optional length (4–10 digits) and expiry (minutes). Returns status "queued".
HellioMessaging::otp('233241234567', 'HellioSMS');                          // SMS
HellioMessaging::otp('233241234567', 'HellioSMS', 'voice');                 // Voice (TTS reads the code)
HellioMessaging::otp('233241234567', channel: 'whatsapp');                  // WhatsApp (no sender)
HellioMessaging::otp('233241234567', 'HellioSMS', length: 6, expiry: 10);   // custom length / expiry
HellioMessaging::otp('user@example.com', channel: 'email');                 // Email (no sender)
HellioMessaging::verify('233241234567', '123456');                          // bool
HellioMessaging::verifyOtp('user@example.com', '123456', 'email');          // full response

// Voice broadcast — text (we TTS it) or a hosted audio_url
HellioMessaging::voice('233241234567', 'HELLIO', text: 'Your code is 1 2 3 4');
HellioMessaging::voice(['233241234567'], 'HELLIO', audioUrl: 'https://cdn.example.com/promo.mp3');

// Number lookup (HLR) — async; poll results
HellioMessaging::lookup(['233241234567']);
HellioMessaging::lookups();
HellioMessaging::lookupResult(5);

// Email verification
HellioMessaging::verifyEmail(['user@gmail.com', 'bad@nodomain.invalid']);

// Webhooks (receive delivery reports)
HellioMessaging::createWebhook('https://your-app.com/hooks/hellio', ['message.delivered', 'message.failed']);
HellioMessaging::webhooks();
HellioMessaging::deleteWebhook(1);
```

USSD
----

[](#ussd)

Build interactive USSD services on your own dialer code. Reached through `HellioMessaging::ussd()` (needs an API token with the `ussd` ability). A **USSD app**holds your `callback_url`; an **extension** is the dialer code (e.g. `*920*100#`) you rent and point at the app. App and extension IDs are **UUID strings**. List endpoints are cursor-paginated (`data` + `meta.next_cursor`).

Apps have a **test/live mode**. A new app starts in `test`: you can simulate it in the sandbox by `app_id` straight away (no charge, no extension needed). To take it live, rent an extension for the app, then call `setMode($id, 'live')`. Each app carries a separate `test_secret` and `live_secret` (prefixed `ussk_test_` / `ussk_live_`) for signing inbound callbacks. Extension rental draws from a **dedicated USSD balance**, separate from SMS credit and the main wallet.

```
// Pricing and availability
HellioMessaging::ussd()->pricing();               // short code + session/extension prices
HellioMessaging::ussd()->availability(100);       // ['data' => ['valid' => true, 'available' => true, ...]]

// Apps (your callback endpoints) - new apps start in "test" mode
$app = HellioMessaging::ussd()->createApp('Airtime top-up', 'https://your-app.com/ussd');
$id = $app['data']['id'];                          // UUID string
$testSecret = $app['data']['test_secret'];         // ussk_test_...  (verify sandbox callbacks)
$liveSecret = $app['data']['live_secret'];         // ussk_live_...  (verify live callbacks)
HellioMessaging::ussd()->apps();
HellioMessaging::ussd()->updateApp($id, 'Airtime top-up', 'https://your-app.com/ussd', true);
HellioMessaging::ussd()->deleteApp($id);

// Simulate a dial against your callback (always sandbox/test mode, by app_id).
// No real handset, no charge, no extension needed. serviceCode is optional and
// defaults to the shared short code.
$step = HellioMessaging::ussd()->simulate($id, 'sess-1', '233241234567', '', newSession: true);
// $step['data'] => ['message' => 'Welcome', 'action' => 'continue', 'continue' => true]

// Extensions (rent a dialer code from your USSD balance, optionally bound to an app)
$ext = HellioMessaging::ussd()->rentExtension(100, $id);
HellioMessaging::ussd()->extensions();
HellioMessaging::ussd()->releaseExtension($ext['data']['id']);

// Go live once the app has an extension, and rotate a secret when needed
HellioMessaging::ussd()->setMode($id, 'live');
HellioMessaging::ussd()->rotateSecret($id, 'live');   // "test" or "live"

// Sessions (audit trail)
HellioMessaging::ussd()->sessions('ended');
HellioMessaging::ussd()->session($id);
```

Things that can fail: renting a taken code throws `ExtensionUnavailableException` (409); a short USSD balance throws `InsufficientBalanceException` (402, `insufficient_ussd_balance`); switching an app to `live` before it has an extension throws `ExtensionRequiredException`(402, `extension_required`); simulating an app you don't own throws `ValidationException`(422, `unknown_app`).

### Inbound callback

[](#inbound-callback)

When a subscriber dials your extension, Hellio POSTs `{ sessionId, msisdn, serviceCode, input, sequence, mode }` to the app's `callback_url`, signed with header `X-Hellio-Signature = HMAC-SHA256(rawBody, secret)`. Use the secret that matches the request's `mode`: `test_secret` for sandbox/simulated traffic, `live_secret`once the app is live. Verify it and reply with `{ message, action }` (`action` is `continue`or `end`):

```
public function handle(\Illuminate\Http\Request $request)
{
    $secret = $request->input('mode') === 'live'
        ? config('services.hellio.ussd_live_secret')
        : config('services.hellio.ussd_test_secret');
    $expected = hash_hmac('sha256', $request->getContent(), $secret);
    abort_unless(hash_equals($expected, $request->header('X-Hellio-Signature', '')), 403);

    return response()->json([
        'message' => 'Welcome to Airtime top-up',
        'action' => 'continue',
    ]);
}
```

Notification channel
--------------------

[](#notification-channel)

```
use Hellio\HellioMessaging\Message\HellioMessagingSms;

class OrderShipped extends \Illuminate\Notifications\Notification
{
    public function via($notifiable): array { return ['helliomessaging']; }

    public function toHellioMessaging($notifiable): HellioMessagingSms
    {
        return (new HellioMessagingSms())
            ->message('Your order has shipped!')
            ->sender('HellioSMS');
    }
}
```

Route it on the notifiable:

```
public function routeNotificationForHelliomessaging($notification) { return $this->phone; }
```

Validation rule
---------------

[](#validation-rule)

Verify an OTP a user typed (defaults to the `mobile_number` field):

```
$request->validate([
    'mobile_number' => 'required',
    'otp' => 'required|hellio_otp:mobile_number',
]);
```

Error handling
--------------

[](#error-handling)

Non-2xx responses throw typed exceptions (all extend `HellioException`):

ExceptionStatus`InvalidApiTokenException`401`InsufficientBalanceException` (incl. USSD `insufficient_ussd_balance`)402`ExtensionRequiredException` (USSD app needs an extension before going live)402`ExtensionUnavailableException` (USSD extension taken)409`ValidationException` (`->response['errors']`)422`RateLimitException`429`ServiceUnavailableException`503`HellioException`other```
use Hellio\HellioMessaging\Exceptions\InsufficientBalanceException;

try {
    HellioMessaging::sms('233241234567', 'Hi');
} catch (InsufficientBalanceException $e) {
    // top up
}
```

Rate limit: **120 requests/minute** per token.

License
-------

[](#license)

MIT

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance92

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.8% 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 ~1 days

Total

3

Last Release

41d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d41ae876a30a1d3cb85ea4bc94fea4342991761a83deb572e9aa8a6a984957a5?d=identicon)[helliomessaging](/maintainers/helliomessaging)

---

Top Contributors

[![VimKanzoGH](https://avatars.githubusercontent.com/u/18662169?v=4)](https://github.com/VimKanzoGH "VimKanzoGH (76 commits)")[![Norris1z](https://avatars.githubusercontent.com/u/18237132?v=4)](https://github.com/Norris1z "Norris1z (5 commits)")

---

Tags

laravel-smssms-laravel-packagelaravel-notification packagehellio messagingbulk sms in Ghanalaravel integration smslaravel otp packagelaravel channel notification packagelaravel voice sms packagelaravel ussd packageussd ghana

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/helliosolutions-helliosms/health.svg)

```
[![Health](https://phpackages.com/badges/helliosolutions-helliosms/health.svg)](https://phpackages.com/packages/helliosolutions-helliosms)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

88212.7M188](/packages/spatie-laravel-health)[craftcms/cms

Craft CMS

3.6k3.7M3.4k](/packages/craftcms-cms)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1239.7k25](/packages/fleetbase-core-api)[illuminate/http

The Illuminate Http package.

11938.5M8.2k](/packages/illuminate-http)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.3M49](/packages/tencentcloud-tencentcloud-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

353.6k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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