Socket
Socket
Sign inDemoInstall

msg91

Package Overview
Dependencies
8
Maintainers
6
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

msg91

Official NodeJS package for msg91 services.


Version published
Maintainers
6
Weekly downloads
1,198
decreased by-22.51%

Weekly downloads

Readme

Source

MSG91

NodeJS package for msg91 services.

Initialize Msg91

import msg91 from "msg91";
/**
*OR
*const msg91 = require('msg91').default;
*/

msg91.initialize({authKey: "Your-Auth-Key"});

SMS Example

let sms = msg91.getSMS();

// Send SMS
sms.send("flowId",{'mobile':"MOBILE_NUMBER_WITH_COUNTRY_CODE","VAR1":"123"});

OTP Example

let otp = msg91.getOTP("otpTemplateId", { length: 6 });
// Send OTP
otp.send("MOBILE_NUMBER_WITH_COUNTRY_CODE");
// Retry OTP
otp.retry("MOBILE_NUMBER_WITH_COUNTRY_CODE");
// Verify OTP
otp.verify("MOBILE_NUMBER_WITH_COUNTRY_CODE","YOUR_OTP");

Campaign Example

const campaign = msg91.getCampaign();
// Get list of campaigns
campaign.getAll().then(list=>console.log(list));
// Run a campaign
campaign.run('slug', {data: {}});

Keywords

FAQs

Last updated on 09 Feb 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc