Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

msg91-templateid

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

msg91-templateid

API For MSG91 SMS Gateway. - It is not an official version of MSG91

  • 0.0.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
221
decreased by-32.83%
Maintainers
1
Weekly downloads
 
Created
Source

Msg91

Msg91 API for node.js

NPM

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


// Provide sender Id that has been approve by DLT
var msg91 = require("msg91-templateid")("API_KEY", "SENDER_ID", "ROUTE_NO" );


// Mobile No can be a single number, list or csv string

var mobileNo = "XXXXXXXXXX";

var mobileNo = [ "XXXXXXXXXX", "XXXXXXXXXX", "XXXXXXXXXX" ];

var mobileNo =  "XXXXXXXXXX,XXXXXXXXXX,XXXXXXXXXX";

// provide the approved DLT TemplateId that has been associated with the senderId 

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);
});

// Get Balance for given Route.
msg91.getBalance("ROUTE_NO", function(err, msgCount){
    console.log(err);
    console.log(msgCount);
});

Msg91 Constants

ROUTE_NO

1 - Promotional Route
4 - Transactional Route

Keywords

FAQs

Package last updated on 15 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc