Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
export const requestCode = (phoneNo, callback) => {
vonage.verify.request({
number: phoneNo,
brand: "Your App/Website Name"
}, (err, result) => {
if (err) {
console.error(err);
callback(false);
} else {
if (result.request_id) {
console.log('====request success====', result);
callback(result);
} else {
console.log("====request err====", result);
callback(false);
}
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment