Skip to content
This repository was archived by the owner on Jun 26, 2026. It is now read-only.

Latest commit

History

History
38 lines (30 loc) · 823 Bytes

File metadata and controls

38 lines (30 loc) · 823 Bytes

MSG91 for Node.js

Unoffocial client for MSG91 to send, resend and verify OTPs over SMS.

Usage

constmsg91=require("msg91-node")("MSG91_KEY");constnumber="XXXXXXXXXX";/** * Send OTP to given phone number * @param {string} number * @param {string} templateId * @returns {Promise<boolean>} */constsent=awaitmsg91.send(number,"MSG91_TEMPLATE_ID");/** * Verify OTP to given phone number with given otp * @param {string} number * @param {string} otp * @returns {Promise<boolean>} */constverify=awaitmsg91.verify(number,otp);/** * Resend OTP to given phone number * @param {string} number * @param {boolean} voice * @returns {Promise<boolean>} */constresend=awaitmsg91.resend(number);

License

See the LICENSE file.