Unoffocial client for MSG91 to send, resend and verify OTPs over SMS.
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);See the LICENSE file.