我一直试图通过Twilio用我买的号码发送短信 . 以下是我采取的步骤:

  • 制作了Twilio帐户

  • 去了“电话号码”并要求提供电话号码

然后我去了"account"并找到了我的真实帐户sid和授权码 . 然后我将此方法放在 Meteor.isServer 中:

Meteor.methods({
sendSMS: function(){
    twilio = Twilio('sid', 'auth code');
    twilio.sendSms({

                   to:'+7033502148', // Any number Twilio can deliver to
                   from: '+13348331065', // A number you bought from Twilio and can use for outbound communication
                   body: 'Test.' // body of the SMS message
                   }, function(err, responseData) { //this function is executed when a response is received from Twilio
                   if (!err) { // "err" is an error received during the request, if any
                   // "responseData" is a JavaScript object containing data received from Twilio.
                   // A sample response from sending an SMS message is here (click "JSON" to see how the data appears in JavaScript):
                   // http://www.twilio.com/docs/api/rest/sending-sms#example-1
                   console.log(responseData.from); // outputs "+14506667788"
                   console.log(responseData.body); // outputs "word to your mother."
                   }
                   });
}
               });

并且..我从客户端的外部函数调用 sendSMS (使用 Meteor.call('sendSMS') ) . 我已经验证 sendSMS 实际上是通过使用 console.log 来调用的 . 谁能告诉我我在这里缺少的步骤?

没有错误;它只是不发送给收件人 .