RapidAPI logo

Msg91

FREEMIUM
By rwalkover
Updated 4 months ago
Advertising
2/10
Popularity Score
1959ms
Latency
100%
Success Rate

Msg91 API Documentation

We are Responsible to Deliver your SMS Instantly. Everytime

View API Details
POSTSEND SMS
Public API
GETNDNC Check
POSTSEND SMS
Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
mobilesSTRING
REQUIREDKeep numbers in international format (with country code), multiple numbers should be separated by comma (,)
messageSTRING
REQUIREDMessage content to send
senderSTRING
REQUIREDReceiver will see this as sender's ID.
routeSTRING
REQUIREDIf your operator supports multiple routes then give one route name. Eg: route=1 for promotional, route=4 for transactional SMS.
authkeySTRING
REQUIRED
Optional Parameters
countrySTRING
OPTIONAL0 for international,1 for USA, 91 for India.
unicodeSTRING
OPTIONALunicode=1 (for unicode SMS)
schtimeSTRING
OPTIONALWhen you want to schedule the SMS to be sent. Time format will be Y-m-d h:i:s
responseSTRING
OPTIONALBy 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
campaignSTRING
OPTIONALCampaign name you wish to create.
Code Snippet
unirest.post("https://rwalkover-msg91-v1.p.rapidapi.com/sendhttp.php?response=json&authkey=MSG91+Authkey")
.header("X-RapidAPI-Host", "rwalkover-msg91-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://rwalkover-msg91-v1.p.rapidapi.com/sendhttp.php
Request Method: POST
Response Headers
Response Body
Log inSign up

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://rwalkover-msg91-v1.p.rapidapi.com/sendhttp.php?response=json&authkey=MSG91+Authkey")
.header("X-RapidAPI-Host", "rwalkover-msg91-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication