2、如果使用了错误的auth_token 、account_sid 、from_num 我们在开发者工具中的信息按钮中,可以看到明确的错误信息,比如
1.HTTP 401 error: Unable to create record: Authenticate
2.HTTP 400 error: Unable to create record: The number +8613156831234 is unverified. Trial accounts cannot send messages to unverified numbers; verify +8613156831234 at twilio.com/user/account/phone-numbers/verified, or purchase a Twilio number to send messages to unverified numbers.
前者的错误是因为auth_token 、account_sid 、from_num不对,后者的错误是因为免费的twilio账号的限制,我们必须通过验证才能给这个号码发送短信