PHPackages                             shubhampokhriyal/msg91-dlt - 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. shubhampokhriyal/msg91-dlt

ActivePackage

shubhampokhriyal/msg91-dlt
==========================

msg91 wrapper with DLT

01PHP

Since Apr 8Pushed 5y ago1 watchersCompare

[ Source](https://github.com/shubhampokhriyal/msg91-dlt)[ Packagist](https://packagist.org/packages/shubhampokhriyal/msg91-dlt)[ RSS](/packages/shubhampokhriyal-msg91-dlt/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

- [Installation](#installation)
    - [Supported Framework](#supportedframeworks)
- [Config file setup](#configfilesetup)
- [ SMS API](#smsapi)
    - [SendTransactional &amp; SendPromotional](#1.sendTransactionalsendPromotionalusingget)
    - [SendBulkSms](#2.sendbulksmsusingpost)
- [ OTP API](#otpapi)
    - [SEND OTP](#sendotp)
    - [RESEND OTP](#resendotp)
    - [VERIFY OTP](#verifyotp)

### Installation

[](#installation)

Run the following command to install the latest applicable version of the package:

```
composer require shubhampokhriyal/msg91-dlt
```

```
"require": {
        "shubhampokhriyal/msg91-dlt": "dev-master"
        }
```

Supported FrameWorks
--------------------

[](#supported-frameworks)

- `Laravel5.3`, `Laravel5.4`, `laravel5.5` we are suggested Laravel frame work
- `Symfony 3.1`, `Slim 3.8 `, `Zend 3.0`, `Codeigniter 3.1`

Config file setup
-----------------

[](#config-file-setup)

- Config file Now, using only for send Authkey.

`Three ways send Authkey`

Tips 1: `Using Config`

```
'msg91' => [
    'common' => [
        'transAuthKey' =>  "17086...........9a87a1",
        'promoAuthKey' =>  "17086...........9a87a1",
        'otpAuthKey'   =>  "17043...........59969531",
    ],
]
```

Tips 2: `Using Class parameter`

```
use Sender\PromotionalSms;
use Sender\TransactionalSms;

$sms = new PromotionalSms("17043...........59969531");
$sms->PromotionalSms("919******541,919******728",$sample);

$sms = new TransactionalSms("17043...........59969531");
$sms->sendTransactional("919******541,919******728",$sample);
```

Tips 3: `Dot Env File`

```
TRANSAUTHKEY=170***************a87a1
OTPAUTHKEY=1704***************531
```

### Coding Standards

[](#coding-standards)

The entire library is intended to be PSR-1, PSR-2 compliant.

### SMS

[](#sms)

[Msg91 Send SMS](http://api.msg91.com/apidoc/textsms/send-sms.php)

- `GET` Method
- `POST` Method

```
 GET
http://api.msg91.com/api/sendhttp.php?authkey=YourAuthKey&mobiles=919999999990,919999999999&message=message&sender=ABCDEF&route=4&country=0
```

Parameter nameData typeDescriptionauthkey \*alphanumericLogin authentication key (this key is unique for every user)mobiles \*integerKeep numbers in international format (with country code), multiple numbers should bemessage \*varcharMessage content to sendsender \*varcharReceiver will see this as sender's ID.DLT\_TE\_ID \*varcharDLT Template ID of a message.route \*varcharIf your operator supports multiple routes then give one route name. Eg: route=1 for promotional, route=4 for transactional SMS.countrynumeric0 for international,1 for USA, 91 for India.flashinteger(0/1) flash=1 (for flash SMS)unicodeinteger(0/1) unicode=1 (for unicode SMS)schtimedate and timeWhen you want to schedule the SMS to be sent. Time format could be of your choice you can use Y-m-d h:i:s (2020-01-01 10:10:00) Or Y/m/d h:i:s (2020/01/01 10:10:00) Or you can send unix timestamp (1577873400)afterminutesintegerTime in minutes after which you want to send sms.responsevarcharBy default you will get response in string format but you want to receive in other format (json,xml) then set this parameter. for example: &amp;response=json or &amp;response=xmlcampaignvarcharCampaign name you wish to create.operator supports.

- route=1 for promotional
- route=4 for transactional

SMS API
=======

[](#sms-api)

1. SendTransactional &amp; SendPromotional Using GET
----------------------------------------------------

[](#1-sendtransactional--sendpromotional-using-get)

- `GET` Method

### Input Data

[](#input-data)

- `$mobileNumber`"919**541,919**728" String 9195\*\*\*\*\*\*\*\*3 Integer
- `$data` Array

### Sample Input Data

[](#sample-input-data)

```
Tips 1:
$sample = [
    'message'      => 'WELCOME TO Msg91',
    'sender'       => 'UTOOWE',
    'DLT_TE_ID'    => '1307161443204186459',
    'country'      => 91,
    'flash'        => 1,
    'unicode'      => 1,
    'schtime'      => "2020-01-01 10:10:00",
    'response'     => "json",
    'afterminutes' => 10,
    'campaign'     => "SHUBHA"
];
use Sender\PromotionalSms;
use Sender\TransactionalSms;

$sms = new PromotionalSms();
$sms->PromotionalSms("919******541,919******728",$sample);

$sms = new TransactionalSms();
$sms->sendTransactional("919******541,919******728",$sample);

Tips 2:
$sample = [
    'message'      => 'WELCOME TO Msg91',
    'sender'       => 'TOOME',
    'DLT_TE_ID'    => '1307161443204186459'
    'country'      => 91,
    'flash'        => 1,
    'unicode'      => 1,
    'schtime'      => "2020-01-01 10:10:00",
    'response'     => "json",
    'afterminutes' => 10,
    'campaign'     => "SHUBHA"
];

use Sender\PromotionalSms;
use Sender\TransactionalSms;

$sms = new PromotionalSms();
$sms = new TransactionalSms();

$sms->sendTransactional(919******541,$sample);
$sms->PromotionalSms(919******541,$sample);
```

### API

[](#api)

```
use Sender\TransactionalSms;
$sms = new TransactionalSms();
$sms->sendTransactional($mobileNumber, $data);
```

```
use Sender\PromotionalSms;
$sms = new PromotionalSms();
$sms->sendPromotional($mobileNumber, $data);
```

2. SendBulkSms Using POST
-------------------------

[](#2-sendbulksms-using-post)

- `POST` Method

### Input Data

[](#input-data-1)

- `$data` Array

### Sample Input Data

[](#sample-input-data-1)

```
Tips 1:
$sample = [
    [
        'authkey' => '17086************k599a87a1',
        'sender'  => 'MULSMS',
        'DLT_TE_ID'    => '1307161443204186459'
        'schtime'=> '2016-03-31 11:17:39',
        'campaign'=> 'SHUBHA',
        'DLT_TE_ID' => 'DLT_TEMPLATE_ID',
        'country'=> '91',
        'flash'=> 1,
        'unicode'=> 1,
        'content' =>[
           [
           'message'    => 'welcome multi sms',
           'mobile' => '91951******1,91880******4,917******972'
           ],
           [
              'message'    => 'shubham world',
              'mobile' => '9195******41,918******824,917******972'
           ]
        ]
    ]
];
Tips 2:
$sample = [
    [
       'authkey' => '17086************k599a87a1',
       'sender'  => 'MULSMS',
       'DLT_TE_ID'    => '1307161443204186459'
       'content' =>[
            [
                'message'    => 'welcome multi sms',
                'mobile' => '919******541,918******824,917******972'
            ],
            [
                'message'    => 'shubham world',
                'mobile' => '9195******41,91880******4,9170******72'
            ]
        ]
    ],
    [
       'authkey' => '17086************k599a87a1',
       'sender'  => 'SUNSMS',
       'DLT_TE_ID'    => '1307161443204186459'
       'content' =>[
            [
                'message'    => 'hi how are u',
                'mobile' => '9195******41,918******824,9******2972'
            ],
            [
                'message'    => 'hai welcome',
                'mobile' => '9195******41,918******824,9******42972'
            ]
        ]
    ]
];
```

### API

[](#api-1)

```
use Sender\PromotionalSms;
$sms = new PromotionalSms();
$sms->sendBulkSms($data);
```

Sample XML
==========

[](#sample-xml)

```

  17086************k599a87a1
  MULSMS
  12312312312

```

Sample Output
=============

[](#sample-output)

```
5134842646923e183d000075
```

> Note : Output will be request Id which is alphanumeric and contains 24 character like mentioned above. With this request id, delivery report can be viewed. If request not sent successfully, you will get the appropriate error message. View error codes

OTP API
=======

[](#otp-api)

[Msg91 Send OTP](http://api.msg91.com/apidoc/sendotp/send-otp.php)

SEND OTP
--------

[](#send-otp)

- `GET` Method

```
GET
http://api.msg91.com/api/sendotp.php?authkey=YourAuthKey&mobile=919999999990&message=Your%20otp%20is%202786&sender=senderid&otp=2786
```

Parameter nameData typeDescriptionauthkey \*alphanumericLogin authentication key (this key is unique for every user)mobile \*integerKeep number in international format (with country code)messagevarcharMessage content to send. (default : Your verification code is ##OTP##.)sendervarcharReceiver will see this as sender's ID. (default : OTPSMS)otpintegerOTP to send and verify. If not sent, OTP will be generated.otp\_expiryintegerExpiry of OTP to verify, in minutes (default : 1 day, min : 1 minute)otp\_lengthintegerNumber of digits in OTP (default : 4, min : 4, max : 9)### Input Data

[](#input-data-2)

- `authkey` \* alphanumeric
- `mobile` \* Integer
- `message` varchar
- `sender` varchar
- `DLT_TE_ID` varchar
- `otp` Integer
- `otp_expiry` Integer
- `otp_length` Integer

### Sample Input Data

[](#sample-input-data-2)

```
$data = [
    'message'       => "Your verification code is ##5421##",
    'sender'        => "SHUBHA",
    'DLT_TE_ID'    => '1307161443204186459'
    'otp'           => 5421,
    'otp_expiry'    => 20,
    'otp_length'    => 4
];
```

### API

[](#api-2)

```
use Sender\Otp;

$otp = new Otp();
$otp->sendOtp($mobile,$data);
```

Sample Output
-------------

[](#sample-output-1)

```
{"message":"3763646c3058373530393938","type":"success"}
```

RESEND OTP
----------

[](#resend-otp)

- `GET` Method

```
http://api.msg91.com/api/retryotp.php?authkey=YourAuthKey&mobile=919999999990&retrytype=voice
```

Parameter nameData typeDescriptionauthkey \*alphanumericLogin authentication key (this key is unique for every user)mobile \*integerKeep number in international format (with country code)retrytypevarcharMethod to retry otp : voice or text. Default is voice.### Input Data

[](#input-data-3)

- `$mobile` Integer
- `$retrytype` String

### Sample Input Data

[](#sample-input-data-3)

```
use Sender\Otp;

$otp = new Otp();

$otp->resendOtp($mobile,"voice")
$otp->resendOtp($mobile,"text")
$otp->resendOtp($mobile)
```

### API

[](#api-3)

```
use Sender\Otp;

$otp = new Otp();
$otp->resendOtp($mobile,$retrytype)
```

Sample Output

```
{"message":"otp_sent_successfully","type":"success"}
```

VERIFY OTP
----------

[](#verify-otp)

- `GET` Method

```
http://api.msg91.com/api/verifyRequestOTP.php?authkey=YourAuthKey&mobile=919999999990&otp=2786
```

Parameter nameData typeDescriptionauthkey \*alphanumericLogin authentication key (this key is unique for every user)mobile \*integerKeep number in international format (with country code)otp \*varcharOTP to verify### Input Data

[](#input-data-4)

- `$mobile` Integer
- `$otp` string

### Sample Input Data

[](#sample-input-data-4)

OtpSend::verifyOtp(919\*\*\***41,9195**421);

### API

[](#api-4)

```
use Sender\Otp;

$otp = new Otp();
$otp->verifyOtp($mobile,$otp);
```

Sample Output

```
{"message":"number_verified_successfully","type":"success"}
```

### NOTE:

[](#note)

```
- Mobile number not attached `+` sign like this `+9195*****41`
```

### Get in touch

[](#get-in-touch)

If you have any suggestions, feel free to email me at .

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

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://avatars.githubusercontent.com/u/17471726?v=4)[Shubham Pokhriyal](/maintainers/shubhampokhriyal)[@shubhampokhriyal](https://github.com/shubhampokhriyal)

### Embed Badge

![Health badge](/badges/shubhampokhriyal-msg91-dlt/health.svg)

```
[![Health](https://phpackages.com/badges/shubhampokhriyal-msg91-dlt/health.svg)](https://phpackages.com/packages/shubhampokhriyal-msg91-dlt)
```

PHPackages © 2026

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