I'm trying to verify otp using the sendotp npm module, but sendOTP.verify method i'm getting the result of callback as null. How can i verify whether otp has been verified of or not.
sendOTP - https://www.npmjs.com/package/sendotp
exports.handler = async (event,context,callback) => {
const SendOtp = require('sendotp');
const sendOTP = new SendOtp('260981AZN8sH3O5c551802');
let mobileNum = event.mobile.toString();
let otp = event.otp.toString();
sendOTP.verify(mobileNum, otp, (error, data) => {
callback(null,{statusCode:200,body:data.type});
});
}