参考此链接https://www.npmjs.com/package/digits-server-client 我正在尝试使用节点 js 将验证码发送到个人手机号码。执行以下代码片段时,它会记录 [ { code: 0 } ] 我错过了什么吗?
var digitsClient = require('digits-server-client');
var digits = new digitsClient({
digitsConsumerKey: 'YlNgs6zwm4QLmrzJBwRK3FcR5',
digitsHost: "https://www.fabric.io"
});
digits.sendVerificationCode({
phoneNumber: 9820XXXXXX,
countryCode: 'IN'
}).then(function (registrationToken) {
console.log(registrationToken);
}).then(null, function (error) {
console.log('logging error');
console.log(error);
});