twilio - 使用 Auth0 无密码语音代替短信
问题描述
我已经可以使用短信,但我需要提供通过电话接收验证码的选项,可以吗?谢谢!
解决方案
Twilio Developer Evangelist here! You can use our Phone Verification API and then pass in the channel ('sms' or 'call') as a parameter like so:
// npm install authy
const authy = require("authy")("YOUR_AUTHY_API_KEY");
authy
.phones()
.verification_start("5551234567", "1", "sms", function(err, res) {
if (err) {
console.log(err);
}
console.log(res.message);
});
Here's the full QuickStart: https://www.twilio.com/docs/verify/quickstart/nodejs
推荐阅读
- javascript - 如何逐步遍历多个数组然后聚合它们
- visual-studio-code - VSCode:Code Runner Extension,如何免除某些文件扩展名?
- json - Flutter - 如何从 List 创建 json 数组
? - c# - 如何制作禁用按钮来暂停脚本
- javascript - 用JS替换任何形式的每个实例或单词
- python - 带有 debugpy 的 vscode:缺少像 pdb 这样的递归模式?
- python - 是否可以从 Azure Python SDK 获取 ASC 位置?
- swift - SwiftUI:如何从轮子选择器导航到视图?
- python - Pygame 无法在 Pycharm 上运行 - “无法识别的选择器发送到实例”
- c++ - 如何从 Win32 中的挂钩 DLL 记录/输出消息?