2.2.4 • Published 3 months ago

msg91 v2.2.4

Weekly downloads
1,677
License
ISC
Repository
github
Last release
3 months ago

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: {}});
2.2.4

3 months ago

2.1.4

1 year ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.4

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

0.0.7

2 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago