Closed apoorv1997 closed 5 years ago
exports.handler = async (event, context, callback) => { const SendOtp = require('sendotp'); const sendOTP = new SendOtp('260981AZN8sH3O5c551802'); sendOTP.send(mobileNum,"611332", (error, data) => { if(err) { return err; } else { const response = { statusCode: 200, body: data.message, }; return response; } })
this is my lambda function and when i invoke the api endpoint i get null as result and nothing more. The function block of sendOTP is not working.
exports.handler = async (event, context, callback) => { const SendOtp = require('sendotp'); const sendOTP = new SendOtp('260981AZN8sH3O5c551802'); sendOTP.send(mobileNum,"611332", (error, data) => { if(err) { return err; } else { const response = { statusCode: 200, body: data.message, }; return response; } })
this is my lambda function and when i invoke the api endpoint i get null as result and nothing more. The function block of sendOTP is not working.