Download the PHP package tesark/msg91-php without Composer
On this page you can find all versions of the php package tesark/msg91-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tesark/msg91-php
More information about tesark/msg91-php
Files in tesark/msg91-php
Rated 3.00 based on 1 reviews
Informations about the package msg91-php
MSG91 SMS & OTP Composer Package
- Installation
- Supported Framework
- Config file setup
- SMS API
- SendTransactional & SendPromotional
- SendBulkSms
- OTP API
- SEND OTP
- RESEND OTP
- VERIFY OTP
Installation
Run the following command to install the latest applicable version of the package:
Supported FrameWorks
Laravel5.3
,Laravel5.4
,laravel5.5
we are suggested Laravel frame workSymfony 3.1
,Slim 3.8
,Zend 3.0
,Codeigniter 3.1
Config file setup
- Config file Now, using only for send Authkey.
Three ways send Authkey
Tips 1: Using Config
Tips 2: Using Class parameter
Tips 3: Dot Env File
Coding Standards
The entire library is intended to be PSR-1, PSR-2 compliant.
SMS
GET
MethodPOST
Method
Parameter name | Data type | Description | |
---|---|---|---|
authkey * | alphanumeric | Login authentication key (this key is unique for every user) | |
mobiles * | integer | Keep numbers in international format (with country code), multiple numbers should be | separated by comma (,) |
message * | varchar | Message content to send | |
sender * | varchar | Receiver will see this as sender's ID. | |
route * | varchar | If your operator supports multiple routes then give one route name. Eg: route=1 for promotional, route=4 for transactional SMS. | |
country | numeric | 0 for international,1 for USA, 91 for India. | |
flash | integer | (0/1) flash=1 (for flash SMS) | |
unicode | integer | (0/1) unicode=1 (for unicode SMS) | |
schtime | date and time | When 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) | |
afterminutes | integer | Time in minutes after which you want to send sms. | |
response | varchar | By default you will get response in string format but you want to receive in other format (json,xml) then set this parameter. for example: &response=json or &response=xml | |
campaign | varchar | Campaign name you wish to create. |
operator supports.
- route=1 for promotional
- route=4 for transactional
SMS API
1. SendTransactional & SendPromotional Using GET
GET
Method
Input Data
$mobileNumber
"919**541,919**728" String 9195****3 Integer$data
Array
Sample Input Data
API
2. SendBulkSms Using POST
POST
Method
Input Data
$data
Array
Sample Input Data
API
Sample XML
Sample Output
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
SEND OTP
GET
Method
Parameter name | Data type | Description |
---|---|---|
authkey * | alphanumeric | Login authentication key (this key is unique for every user) |
mobile * | integer | Keep number in international format (with country code) |
message | varchar | Message content to send. (default : Your verification code is ##OTP##.) |
sender | varchar | Receiver will see this as sender's ID. (default : OTPSMS) |
otp | integer | OTP to send and verify. If not sent, OTP will be generated. |
otp_expiry | integer | Expiry of OTP to verify, in minutes (default : 1 day, min : 1 minute) |
otp_length | integer | Number of digits in OTP (default : 4, min : 4, max : 9) |
Input Data
authkey
* alphanumericmobile
* Integermessage
varcharsender
varcharotp
Integerotp_expiry
Integerotp_length
Integer
Sample Input Data
API
Sample Output
RESEND OTP
-
GET
MethodParameter name Data type Description authkey * alphanumeric Login authentication key (this key is unique for every user) mobile * integer Keep number in international format (with country code) retrytype varchar Method to retry otp : voice or text. Default is voice.
Input Data
$mobile
Integer$retrytype
String
Sample Input Data
API
Sample Output
VERIFY OTP
-
GET
MethodParameter name Data type Description authkey * alphanumeric Login authentication key (this key is unique for every user) mobile * integer Keep number in international format (with country code) otp * varchar OTP to verify
Input Data
$mobile
Integer$otp
string
Sample Input Data
OtpSend::verifyOtp(919***41,9195****421);
API
Sample Output
NOTE:
Get in touch
If you have any suggestions, feel free to email me at [email protected] or ping me on Twitter with @venkatskpi.
All versions of msg91-php with dependencies
monolog/monolog Version ~1.13
hassankhan/config Version 0.8.2