PHPackages                             itexmo/itexmo-sms - 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. itexmo/itexmo-sms

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

itexmo/itexmo-sms
=================

Itexmo SMS Gateway Integration for Laravel

1.0.3(1y ago)0143MITPHPPHP ^7.1.3

Since Oct 15Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Agnes-Kalunda/itexmo-sms)[ Packagist](https://packagist.org/packages/itexmo/itexmo-sms)[ RSS](/packages/itexmo-itexmo-sms/feed)WikiDiscussions master Synced 3w ago

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

Itexmo SMS Gateway for Laravel
==============================

[](#itexmo-sms-gateway-for-laravel)

**Itexmo SMS Gateway Integration for Laravel** is a package that allows you to send SMS messages using the Itexmo API in your Laravel applications. It provides a simple and clean API for sending text messages, checking SMS credits, and broadcasting messages to multiple recipients.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
    - [Sending SMS](#sending-sms)
    - [Checking SMS Balance](#checking-sms-balance)
    - [Broadcasting SMS with OTP](#broadcasting-sms-with-otp)
    - [Sending Two-Dimensional Broadcast](#sending-two-dimensional-broadcast)
- [Available Endpoints](#available-endpoints)
- [Error Handling](#error-handling)
- [Testing the Package](#testing-the-package)

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

[](#installation)

You can install the package via Composer:

```
composer require itexmo/itexmo-sms
```

After installation, the package will automatically register its service provider and facade.

Configuration
-------------

[](#configuration)

To use the Itexmo package, you need to set up your Itexmo credentials in the Laravel environment configuration file (.env).

Add the following lines to your `.env` file:

```
# Mandatory settings
ITEXMO_API_CODE=your_itexmo_api_code            # Replace with your Itexmo API code
ITEXMO_EMAIL=your_itexmo_account_email          # Replace with your Itexmo account email
ITEXMO_PASSWORD=your_itexmo_account_password    # Replace with your Itexmo account password

# Optional settings (default values will be used if not set)
ITEXMO_BASE_URL=https://api.itexmo.com/api/     # Base URL for the Itexmo API (default: https://api.itexmo.com/api/)
ITEXMO_RETRY_ATTEMPTS=3                         # Number of retry attempts if API request fails (default: 3)
ITEXMO_RETRY_DELAY=5                            # Delay between retry attempts in seconds (default: 5)
```

Next, publish the package configuration:

```
php artisan vendor:publish --tag=itexmo-config
```

This will create a configuration file `config/itexmo.php` where you can manage your Itexmo settings.

Usage
-----

[](#usage)

### Sending SMS

[](#sending-sms)

To send an SMS message to a single or multiple recipients, use the `broadcast()` method provided by the `ItexmoSms` class.

Example:

```
use Itexmo\ItexmoSms\ItexmoSms;

$itexmo = app(ItexmoSms::class);
$recipients = ['number_1_here', 'number_2_here'];
$message = 'Hello from Itexmo!';

$response = $itexmo->broadcast($recipients, $message);

if ($response['success']) {
    echo "SMS sent successfully!";
} else {
    echo "SMS sending failed: " . $response['message'];
}
```

### Checking SMS Balance

[](#checking-sms-balance)

You can check your current SMS balance using the `checkBalance()` method. This will return the remaining credits in your Itexmo account.

Example:

```
$itexmo = app(ItexmoSms::class);
$response = $itexmo->checkBalance();

if ($response['success']) {
    echo "Your balance is: " . $response['data']['Balance'];
} else {
    echo "Failed to check balance: " . $response['message'];
}
```

### Broadcasting SMS with OTP

[](#broadcasting-sms-with-otp)

To send OTP (One-Time Password) to a single or multiple recipients, you can use the `broadcastOTP()` method.

Example:

```
$recipients = ['number_1_here', 'number_2_here'];
$message = 'Your OTP is 123456.';

$response = $itexmo->broadcastOTP($recipients, $message);

if ($response['success']) {
    echo "OTP sent successfully!";
} else {
    echo "Failed to send OTP: " . $response['message'];
}
```

### Sending Two-Dimensional Broadcast

[](#sending-two-dimensional-broadcast)

To send multiple messages to different recipients, you can use the `broadcast2d()` method. This allows you to send different messages to different phone numbers.

Example:

```
$messages = [
    ['number_1_here', 'Hello John!'],
    ['number_2_here', 'Hello Jane!']
];

$response = $itexmo->broadcast2d($messages);

if ($response['success']) {
    echo "Messages sent successfully!";
} else {
    echo "Failed to send messages: " . $response['message'];
}
```

Available Endpoints
-------------------

[](#available-endpoints)

1. **Broadcast SMS** (`broadcast`)

    - Sends an SMS message to multiple recipients.
    - Parameters:
        - `recipients` (array): An array of phone numbers.
        - `message` (string): The message to send.
    - Example: ```
        $itexmo->broadcast(['number_1_here', 'number_2_here'], 'Hello!');
        ```
2. **Check Balance** (`query`)

    - Retrieves the current SMS balance for the account.
    - Parameters: None
    - Example: ```
        $itexmo->checkBalance();
        ```
3. **Broadcast OTP** (`broadcast-otp`)

    - Sends an OTP (One-Time Password) to multiple recipients.
    - Parameters:
        - `recipients` (array): An array of phone numbers.
        - `message` (string): The OTP message to send.
    - Example: ```
        $itexmo->broadcastOTP(['number_1_here', 'number_2_here'], 'Your OTP is 123456');
        ```
4. **Two-Dimensional Broadcast** (`broadcast-2d`)

    - Sends different messages to different recipients.
    - Parameters:
        - `messages` (array): A two-dimensional array where each element contains a recipient number and the message.
    - Example: ```
        $messages = [
            ['number_1_here', 'Hello John!'],
            ['number_2_here', 'Hello Jane!']
        ];
        $itexmo->broadcast2d($messages);
        ```

Error Handling
--------------

[](#error-handling)

All responses from the Itexmo API are handled within the methods. The responses are returned as arrays with the following keys:

- `success`: Indicates if the request was successful (true or false).
- `message`: Contains a description of the result or error.
- `data`: Contains the raw API response (if applicable).

You can easily check if a request was successful by checking the `success` key.

Example:

```
$response = $itexmo->broadcast(['number_1_here'], 'Test message');

if ($response['success']) {
    echo "SMS sent!";
} else {
    echo "Error: " . $response['message'];
}
```

Testing the Package
-------------------

[](#testing-the-package)

You can test the package using Postman or any other API testing tool. Simply set up an endpoint that triggers one of the available methods (e.g., `broadcast`, `checkBalance`) and call it via an HTTP request.

### Example API Route for SMS Broadcast

[](#example-api-route-for-sms-broadcast)

```
use Illuminate\Http\Request;
use Itexmo\ItexmoSms\ItexmoSms;

Route::post('/send-sms', function (Request $request) {
    $itexmo = app(ItexmoSms::class);
    $recipients = $request->input('recipients'); // an array of phone numbers
    $message = $request->input('message');

    $response = $itexmo->broadcast($recipients, $message);

    return response()->json($response);
});
```

### Testing via Postman

[](#testing-via-postman)

- URL: `http://your-app-url/send-sms`
- Method: POST
- Body: application/json

```
{
  "recipients": ["number_1_here", "number_2_here"],
  "message": "Hello from Itexmo!"
}
```

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

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

License
-------

[](#license)

License
-------

[](#license-1)

This package is open-sourced software licensed under the [MIT license](LICENSE).

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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

4

Last Release

615d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/97960131?v=4)[Agnes-Kalunda](/maintainers/Agnes-Kalunda)[@Agnes-Kalunda](https://github.com/Agnes-Kalunda)

---

Top Contributors

[![Agnes-Kalunda](https://avatars.githubusercontent.com/u/97960131?v=4)](https://github.com/Agnes-Kalunda "Agnes-Kalunda (103 commits)")

---

Tags

composer-packagelaravel5php

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/itexmo-itexmo-sms/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[backpack/crud

Quickly build admin interfaces using Laravel, Bootstrap and JavaScript.

3.4k3.6M217](/packages/backpack-crud)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[unopim/unopim

UnoPim Laravel PIM

10.3k2.2k](/packages/unopim-unopim)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

252143.0k](/packages/erag-laravel-disposable-email)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1348.1k1](/packages/jasara-php-amzn-selling-partner-api)

PHPackages © 2026

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