Error while running Digits webclient for node.js

时间:2016-12-02 04:56:15

标签: node.js twitter-fabric twitter-digits

Referring this link https://www.npmjs.com/package/digits-server-client I am trying to send verification code to personal cell number using node js. When the following code snippet is executed, It logs [ { code: 0 } ] Did i miss out something?

    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);
    });

1 个答案:

答案 0 :(得分:0)

[ { code: 0 } ]表示无效的电话号码。

在没有' XXXXXX'的情况下输入有效的电话号码符号。