PHPackages                             chibex/ozioma-laminas - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. chibex/ozioma-laminas

ActiveLibrary[Queues &amp; Workers](/categories/queues)

chibex/ozioma-laminas
=====================

Laminas module that provides wrapper for ozioma-php API client library.

v1.0.1(6y ago)352MITPHPPHP ^5.6 || ^7.0

Since Mar 12Pushed 6y ago1 watchersCompare

[ Source](https://github.com/chibex-tech/ozioma-laminas)[ Packagist](https://packagist.org/packages/chibex/ozioma-laminas)[ Docs](https://ozioma.net/)[ RSS](/packages/chibex-ozioma-laminas/feed)WikiDiscussions master Synced yesterday

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

ozioma-laminas
==============

[](#ozioma-laminas)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d7648037e19a398002d21ecaee01b1df4719c28db8504c67c234c06e54a453fc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6368696265782f6f7a696f6d612d6c616d696e61732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/chibex/ozioma-laminas)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/3b7f1520d9ebb53dd24bbcb8565e2c47f9e20db018f66bd6a1a47025a95fc8e1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6368696265782f6f7a696f6d612d6c616d696e61732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/chibex/ozioma-laminas)

A Laminas PHP framework/Zend Framework 3 module for [Ozioma](https://ozioma.net/) API.

[![Ozioma](img/ozioma.png?raw=true "Ozioma")](https://ozioma.net/)

Requirements
------------

[](#requirements)

- Curl 7.34.0 or more recent (Unless using Guzzle)
- PHP 5.4.0 or more recent
- OpenSSL v1.0.1 or more recent

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

[](#installation)

Installation of OziomaLaminas uses composer. For composer documentation, please refer to [getcomposer.org](http://getcomposer.org/).

```
    $ composer require chibex/ozioma-laminas
```

Then add `Chibex\Ozioma` to your `config/modules.config.php`

Installation without composer is not officially supported, and requires you to install and autoload the dependencies specified in the `composer.json`.

IMPORTANT
---------

[](#important)

This Laminas PHP framework/Zend Framework 3 module is a wrapper for [Ozioma PHP Library](https://github.com/chibex-tech/ozioma-php)

Usage
-----

[](#usage)

Create `config/autoload/ozioma.global.php` then copy and paste below code into the file, replace your access key. See guide on how to generate project's access key and fund it [click here](https://ozioma.net/api/docs)

```
    return [
        'ozioma' => [
            'third-party' => [
                'access-key' => 'YOUR ACCESS KEY HERE',
            ],
        ],
    ];
```

### 0. Prerequisites

[](#0-prerequisites)

Confirm that your server can conclude a TLSv1.2 connection to Ozioma's servers. Most up-to-date software have this capability. Contact your service provider for guidance if you have any SSL errors.

This module has `oziomaClient` controller plugin which can be access like this `$this->oziomaClient()` in your controllers. This controller plugin will return instance of `Chibex\Ozioma\Service\OziomaClientManager` service which implements all methods for invoking Ozioma API resources.

### 1. Checking your project units balance

[](#1-checking-your-project-units-balance)

Note that you can fund each of your projects with units separately and when project units exhausted it will not eat into your main balance. This method returns units balance for project access key suplied.

```
    try {
        $response =  $this->oziomaClient()->getBalance();
        var_dump($response);

    } catch(\Chibex\Ozioma\Exception\ApiException $e){
        print_r($e->getResponseObject());
        die($e->getMessage());
    }
```

### 2. Initiate sending message

[](#2-initiate-sending-message)

When you submit message for sending our server queue's the message for delivery and after delivery your callback url is called to notify your system/website that your message has been sent.

```
    try {
        $response = $this->oziomaClient()->send(['sender' => 'php lib',
                                        'message' => 'it is awesome',
                                        'recipients' => '23470xxxxxxxx',
                                        'use_corporate_route' => true, // [true or false]
                                        'callback_url' => 'http://your-website/your-callback-url',
                                        ]);
        var_dump($response);

    } catch(\Chibex\Ozioma\Exception\ApiException $e){
        print_r($e->getResponseObject());
        die($e->getMessage());
    }
```

#### send method parameters

[](#send-method-parameters)

- `sender` is your custom name/title for your message and is should not exceed 11 characters (space is also counted as character)
- `recipients` is the phone number(s) you are sending message to
- `message` is the content you want to send to your recipient(s)
- `use_corporate_route` cant either be true or false. Value 'true' means that you want your message delivers to Do-Not-disturb (DND) numbers for countries that has dnd policy
- `callback_url` When you submit message for sending our server queue's the message for delivery and after delivery your callback url is called to notify your system/website that your message has been sent. Then you can use the message id passed as query string to retrieve delivery details. This parameter is optional in case you don't want to receive callback

### 3. Fetching sent message details

[](#3-fetching-sent-message-details)

When you submit message for sending an id is returned, you can use the returned id to pull the message details.

```
    try {
        $response =  $this->oziomaClient()->fetchSentMessage($id);
        var_dump($response);

    } catch(\Chibex\Ozioma\Exception\ApiException $e){
        print_r($e->getResponseObject());
        die($e->getMessage());
    }
```

### 4. Fetching sent message extras

[](#4-fetching-sent-message-extras)

To get the recipients, units charged and delivery status of send a sent message, use this method the sent message id.

```
    try {
        $response =  $this->oziomaClient()->fetchSentMessageExtras($id);
        var_dump($response);

    } catch(\Chibex\Ozioma\Exception\ApiException $e){
        print_r($e->getResponseObject());
        die($e->getMessage());
    }
```

### 5. Scheduling message

[](#5-scheduling-message)

Most of the parameter are the same with `send` method above. Before scheduling message you need to include `time_zone_id`, call `$this->oziomaClient()->listTimeZones()` for the list of time zones and their ids.

```
    try {
        $response = $this->oziomaClient()->schedule(['sender' => 'php lib',
                                    'message' => 'it is awesome',
                                    'recipients' => '23470xxxxxxxx',
                                    'use_corporate_route' => true,
                                    'callback_url' => 'http://your-website/your-callback-url',
                                    'extras' => [[
                                        'deliver_at' => '2019-07-23 10:10',
                                        'time_zone_id' => 2,
                                    ]]]);
        var_dump($response);

    } catch(\Chibex\Ozioma\Exception\ApiException $e){
        print_r($e->getResponseObject());
        die($e->getMessage());
    }
```

- `extras` accepts arrays of delivery times, in case you want your scheduled message to deliver at different times.
- `time_zone_id` You can call our time zone endpoint to get list of timezones and their ids. It's used to set at what timezone you want your scheduled message to delivery to your recipient(s)

### 7. Add Subscriber to your Newsletter list

[](#7-add-subscriber-to-your-newsletter-list)

To add subscriber from your system/website to your Newsletter list, first login to your Ozioma dashboard and create the newsletter list. Next call Newsletter `$this->oziomaClient()->newsletterList();` to pull your list with their ids

```
    try {
        $response =  $this->oziomaClient()->addSubscriber([
                                    'id' => 2, //sms newsletter id
                                    'name' => 'Chibuike Mba',
                                    'phone_no' => '23470xxxxxxxx']);
        var_dump($response);

    } catch(\Chibex\Ozioma\Exception\ApiException $e){
        print_r($e->getResponseObject());
        die($e->getMessage());
    }
```

### 9. Add Subscribers to your Newsletter list

[](#9-add-subscribers-to-your-newsletter-list)

This is same as adding single subscriber but in this case you add multiple subscribers at once

```
    try {
        $response =  $this->oziomaClient()->addBulkSubscribers([
                                        'id' => 2, //sms newsletter id
                                        'subscribers' => [[
                                            'name' => 'Izuchukwugeme Okafor',
                                            'phone_no' => '23470xxxxxxxx'
                                        ],[
                                            'name' => 'Franklin Nnakwe',
                                            'phone_no' => '23480xxxxxxxx'
                                        ]]]);
        var_dump($response);

    } catch(\Chibex\Ozioma\Exception\ApiException $e){
        print_r($e->getResponseObject());
        die($e->getMessage());
    }
```

### 10. Add Birthday Contact to your Birthday group

[](#10-add-birthday-contact-to-your-birthday-group)

To add contact from your system/website to your birthday group, first login to your Ozioma dashboard and create the birthday group. Next call Birthday `$this->oziomaClient()->birthdayGroupList();` to pull your groups with their ids

```
    try {
        $response =  $this->oziomaClient()->addBirthdayContactToGroup([
                                        'group_id' => 7, //birthday group id
                                        'name' => 'Dennis Okonnachi',
                                        'phone_no' => '23470xxxxxxxx',
                                        'day' => 9,
                                        'month_id' => 1,
                                    ]);
        var_dump($response);

    } catch(\Chibex\Ozioma\Exception\ApiException $e){
        print_r($e->getResponseObject());
        die($e->getMessage());
    }
```

### 12. Add Birthday Contacts to your Birthday group

[](#12-add-birthday-contacts-to-your-birthday-group)

This is same as adding single contact but in this case you add multiple contacts at once

```
    try {
        $response =  $this->oziomaClient()->addBulkBirthdayContactsToGroup([
                                        'group_id' => 7, //birthday group id
                                        'contacts' => [[
                                            'name' => 'Caleb',
                                            'phone_no' => '23470xxxxxxxx',
                                            'day' => 9,
                                            'month_id' => 1,
                                        ]]]);
        var_dump($response);

    } catch(\Chibex\Ozioma\Exception\ApiException $e){
        print_r($e->getResponseObject());
        die($e->getMessage());
    }
```

. Closing Notes
---------------

[](#-closing-notes)

Currently, we support: 'message', 'newsletter', 'birthday', 'month', 'balance' and 'timezones'. Check our API reference([link-ozioma-api-reference](https://ozioma.net/api/docs)) for the methods supported. To specify parameters, send as an array.

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) and [CONDUCT](.github/CONDUCT.md) for details. Check our [todo list](TODO.md) for features already intended.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Chibex Technologies](https://github.com/chibex-tech)
- [Chibuike Mba](https://github.com/chibexme)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Total

2

Last Release

2252d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/30c48b198a9b411cca10709abb49082ef89c473765b2de4304d310fa1f1f5ccb?d=identicon)[chibexme](/maintainers/chibexme)

---

Top Contributors

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

---

Tags

birthdaybirthday-messagebirthday-wishesbirthdaysnewsletternewsletter-apinewsletter-servicenewsletter-softwarenewsletter-subscriptionsnewsletterssmssms-apisms-clientsms-gatewaysms-messagessms-notificationssms-sdksms-servicesms-verificationsmscmessageapilaminassmsmessagingmodulecontactsubscribernewsletterbulk-smsbirthdaychibexozioma-phpoziomabirthday contactbirthday smsbirthday messagesms newsletter

### Embed Badge

![Health badge](/badges/chibex-ozioma-laminas/health.svg)

```
[![Health](https://phpackages.com/badges/chibex-ozioma-laminas/health.svg)](https://phpackages.com/packages/chibex-ozioma-laminas)
```

###  Alternatives

[traderinteractive/mongo-queue

Message queue using MongoDB as a backend

4617.5k](/packages/traderinteractive-mongo-queue)

PHPackages © 2026

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