Msg91
Msg91 API for node.js
Msg91 Installation
npm install msg91-templateid --save
This is a fork from msg91 by Hiren Soni to support Msg91 API with DLT Template Id
Msg91 Integration
If you want to send messages in India as per new TRAI rule
- You need to register your sender Id at Dlt
- You need to approve your msg teplate at Dlt
Send SMS
var msg91 = require("msg91-templateid")("API_KEY", "SENDER_ID", "ROUTE_NO" );
var mobileNo = "XXXXXXXXXX";
var mobileNo = [ "XXXXXXXXXX", "XXXXXXXXXX", "XXXXXXXXXX" ];
var mobileNo = "XXXXXXXXXX,XXXXXXXXXX,XXXXXXXXXX";
msg91.send(mobileNo, "MESSAGE","TEMPLATE_ID", function(err, response){
console.log(err);
console.log(response);
});
Get Balance
msg91.getBalance(function(err, msgCount){
console.log(err);
console.log(msgCount);
});
msg91.getBalance("ROUTE_NO", function(err, msgCount){
console.log(err);
console.log(msgCount);
});
Msg91 Constants
ROUTE_NO
1 - Promotional Route
4 - Transactional Route