PHPackages                             moemengaballah/msegat - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. moemengaballah/msegat

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

moemengaballah/msegat
=====================

This is a Laravel package for msegat. Its goal is to remove the complexity

v1.0(2y ago)1619.5k↓35%2MITPHP

Since Oct 26Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Moemen-Gaballah/laravel-msegat)[ Packagist](https://packagist.org/packages/moemengaballah/msegat)[ RSS](/packages/moemengaballah-msegat/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Package laravel-msegat
======================

[](#package-laravel-msegat)

This is a Laravel package for msegat. Its goal is to remove the complexity

Package Laravel Msegat
----------------------

[](#package-laravel-msegat-1)

[![Unit Tests](https://github.com/barryvdh/laravel-debugbar/workflows/Unit%20Tests/badge.svg)](https://github.com/barryvdh/laravel-debugbar/workflows/Unit%20Tests/badge.svg)[![Packagist License](https://camo.githubusercontent.com/b5924d4b515082b8e54cd79c8ac6f34a2cd87907b0c3e593dd80839d7cb39380/68747470733a2f2f706f7365722e707567782e6f72672f62617272797664682f6c61726176656c2d64656275676261722f6c6963656e73652e706e67)](http://choosealicense.com/licenses/mit/)[![Latest Stable Version](https://camo.githubusercontent.com/7277f25a1415fe85217e613cf532ebde9dc09a79d46cc331c1a37dca6dd8b3b4/68747470733a2f2f706f7365722e707567782e6f72672f62617272797664682f6c61726176656c2d64656275676261722f76657273696f6e2e706e67)](https://packagist.org/packages/moemengaballah/msegat)[![Total Downloads](https://camo.githubusercontent.com/130b2c3dea50f3b294b9bd3da3bd77127b230074eb0e6e450e1a7d57dee90633/68747470733a2f2f706f7365722e707567782e6f72672f62617272797664682f6c61726176656c2d64656275676261722f642f746f74616c2e706e67)](https://packagist.org/packages/moemengaballah/msegat)

This is a package for [msegat](https://msegat.docs.apiary.io/). Its goal is to remove the complexity.

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

[](#installation)

```
composer require moemengaballah/msegat
```

Laravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

### Laravel version less than 5.5:

[](#laravel-version-less-than-55)

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

```
MoemenGaballah\Msegat\MsegatServiceProvider::class,
```

If you want to use the facade to log messages, add this to your facades in app.php:

```
'Msegat' => MoemenGaballah\Msegat\Msegat::class,
```

#### Copy the package config to your local config with the publish command:

[](#copy-the-package-config-to-your-local-config-with-the-publish-command)

```
php artisan vendor:publish --provider="msegat"
```

Usage
-----

[](#usage)

You must add first API Credentials in file env

```
MSEGAT_USERNAME=
MSEGAT_USER_SENDER=
MSEGAT_API_KEY=
```

Example OTP
-----------

[](#example-otp)

```
// numbers (required, string, international format without zeros separated by comma, example: "966xxxxxxxxx" or "966xxxxxxxxx,966xxxxxxxxx,966xxxxxxxxx")
//Msegat::sendMessage('numbers', 'MSG');
use Msegat;

$msg = Msegat::sendMessage('966xxxxxxxxx', 'رمز التحقق: 1234');

dd($msg);
```

```
// another example
Route::get('/', function () {
    $msg = Msegat::sendMessage('966xxxxxxxxx', 'رمز التحقق: 1234');
    dd($msg);
});
```

if you don't have Credentials
-----------------------------

[](#if-you-dont-have-credentials)

```
This API is based on HTTPS protocol

You must have an account to test this API, to register please click here

You must use HTTPS POST with parameters in body [ VERY IMPORTANT ]

You must use URL ENCODING when you send the variables

If SMS is English only, we will charge 1 point for each 160 chars and if you send more than this, we will charge 1 point for each 153 chars

If SMS contains language other than English, we will charge 1 point for each 70 chars and if you send more than this, we will charge 1 point for each 67 chars

You can test our API for free . You will get free sms every day . To test our service you can send sms using below parameters:

userSender: OTP
msg: "Pin Code is: xxxx" or "Verification Code: xxxx"
```

status code and Messages
------------------------

[](#status-code-and-messages)

```
1 - Success

M0000 - Success

M0001 - Variables missing

M0002 - Invalid login info

M0022 - Exceed number of senders allowed

M0023 - Sender Name is active or under activation or refused

M0024 - Sender Name should be in English or number

M0025 - Invalid Sender Name Length

M0026 - Sender Name is already activated or not found

M0027 - Activation Code is not Correct

1010 - Variables missing

1020 - Invalid login info

1050 - MSG body is empty

1060 - Balance is not enough

1061 - MSG duplicated

1064 - Free OTP , Invalid MSG content you should use "Pin Code is: xxxx" or "Verification Code: xxxx" or "رمز التحقق: 1234" , or upgrade your account and activate your sender to send any content

1110 - Sender name is missing or incorrect

1120 - Mobile numbers is not correct

1140 - MSG length is too long

M0029 - Invalid Sender Name - Sender Name should contain only letters, numbers and the maximum length should be 11 characters

M0030 - Sender Name should ended with AD

M0031 - Maximum allowed size of uploaded file is 5 MB

M0032 - Only pdf,png,jpg and jpeg files are allowed!

M0033 - Sender Type should be normal or whitelist only

M0034 - Please Use POST Method

M0036 - There is no any sender
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.7% 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

936d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/28e5adec486c43c54a1fe65245f854a1219b92957ad3c8046f6ea853ab78a868?d=identicon)[moemengaballa](/maintainers/moemengaballa)

---

Top Contributors

[![Moemen-Gaballah](https://avatars.githubusercontent.com/u/31255104?v=4)](https://github.com/Moemen-Gaballah "Moemen-Gaballah (13 commits)")[![al-saloul](https://avatars.githubusercontent.com/u/96193006?v=4)](https://github.com/al-saloul "al-saloul (2 commits)")

---

Tags

laravelopen-sourceotpservice-providersms

### Embed Badge

![Health badge](/badges/moemengaballah-msegat/health.svg)

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

PHPackages © 2026

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