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

ActiveLibrary[API Development](/categories/api)

syndrom7/ooredoo-sms
====================

Laravel package for Ooredoo SMS Caster API integration

00PHP

Since Nov 14Pushed 5mo agoCompare

[ Source](https://github.com/Syndrom7/ooredoo-sms-laravel)[ Packagist](https://packagist.org/packages/syndrom7/ooredoo-sms)[ RSS](/packages/syndrom7-ooredoo-sms/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Ooredoo SMS for Laravel
=======================

[](#ooredoo-sms-for-laravel)

A Laravel package for integrating with the Ooredoo SMS Caster API (Maldives).

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

[](#requirements)

- PHP 8.1 or higher
- Laravel 10.x or 11.x

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

[](#installation)

Install via Composer:

```
composer require syndrom7/ooredoo-sms
```

Publish the configuration file:

```
php artisan vendor:publish --tag=ooredoo-sms-config
```

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

[](#configuration)

Add the following to your `.env` file:

```
OOREDOO_SMS_BEARER_TOKEN=your-bearer-token
OOREDOO_SMS_USERNAME=your-username
OOREDOO_SMS_ACCESS_KEY=your-access-key
```

The default endpoint is `https://o-papi1-lb01.ooredoo.mv/bulk_sms/v2`. You can override this in the published config file or via the `OOREDOO_SMS_ENDPOINT` environment variable.

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

```
use Syndrom\OoredooSms\Facades\OoredooSms;

// Send to single recipient
OoredooSms::send('9609166818', 'Your message here');

// Send to multiple recipients
OoredooSms::send(['9609166818', '9609166819'], 'Bulk message');
```

### Fluent API

[](#fluent-api)

```
OoredooSms::to('9609166818')
    ->message('Your message here')
    ->send();

// Multiple recipients
OoredooSms::to(['9609166818', '9609166819'])
    ->message('Bulk message')
    ->send();
```

### Response Handling

[](#response-handling)

The `send()` method returns the API response as an array:

```
$response = OoredooSms::send('9609166818', 'Test message');
```

**Successful Response:**

```
[
    'response_code' => 0,
    'response_message' => 'Message sent successfully',
    'delivery_numbers' => '9609166818'
]
```

**Response Fields:**

- `response_code`: Status code (0 = success)
- `response_message`: Human-readable status message
- `delivery_numbers`: Comma-separated list of recipient numbers

**Usage Example:**

```
$response = OoredooSms::send('9609166818', 'Your message');

if ($response['response_code'] === 0) {
    // SMS sent successfully
    $delivered = $response['delivery_numbers'];
} else {
    // Handle error
    $error = $response['response_message'];
}
```

### Error Handling

[](#error-handling)

The package throws `OoredooSmsException` for validation errors and API failures:

```
use Syndrom\OoredooSms\Exceptions\OoredooSmsException;

try {
    OoredooSms::send('9609166818', 'Your message');
} catch (OoredooSmsException $e) {
    // Handle error
    Log::error('SMS failed: ' . $e->getMessage());
}
```

Testing
-------

[](#testing)

```
composer test
```

Configuration Options
---------------------

[](#configuration-options)

The following options are available in `config/ooredoo-sms.php`:

OptionDescriptionDefault`endpoint`API endpoint URL`https://o-papi1-lb01.ooredoo.mv/bulk_sms/v2``bearer_token`Bearer token for authenticationFrom `.env``username`Ooredoo account usernameFrom `.env``access_key`API access keyFrom `.env``timeout`HTTP request timeout (seconds)`30`License
-------

[](#license)

MIT License. See [LICENSE](LICENSE) for details.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance47

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity13

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/49ed2708a9ac2885109089fa8fbafd1f7c039f422309c9958c36ee6f40a508ed?d=identicon)[Syndrom7](/maintainers/Syndrom7)

---

Top Contributors

[![Syndrom7](https://avatars.githubusercontent.com/u/55350262?v=4)](https://github.com/Syndrom7 "Syndrom7 (1 commits)")

### Embed Badge

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

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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