Twilio-发件人电话号码xxx不是有效的,支持SMS的入站电话 [英] Twilio - The From phone number xxx is not a valid, SMS-capable inbound phone

查看:128
本文介绍了Twilio-发件人电话号码xxx不是有效的,支持SMS的入站电话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Twilio来验证在我的应用程序中注册的用户的电话号码. 作为后端,我有Parse.

I want to use Twilio for verifying phone number of users registering on my app. As a backend, I have Parse.

我尝试使用测试凭据发送短信,到目前为止,我收到了成功消息,但是,我没有收到短信! 我试图切换到实时凭据;但是,我收到以下信息:

I tried to send an SMS using the test credentials, so far I received a success message, but, I didn't received the SMS! I've tried to switch to the live credentials; however, I received the following:

{
    "code": 141,
    "error": {
        "status": 400,
        "message": "The From phone number +12025550162 is not a valid, SMS-capable inbound phone number or short code for your account.",
        "code": 21606,
        "moreInfo": "https://www.twilio.com/docs/errors/21606"
    }
}

我还尝试将发件人"电话号码替换为字母数字的发件人ID,但这还是行不通的!

I've also tried to replace the "From" Phone number to an alphanumeric sender ID, but that didn't work too!

在那种情况下我该怎么办?

What should I do in that case?

推荐答案

此处是Twilio开发人员的福音.

Twilio developer evangelist here.

首先,测试凭据实际上并不发送消息,它们只是用来测试您是否正确发出了API请求.另请注意,它们仅适用于特定的数字,并且仅适用于一些端点

Firstly, test credentials don't actually send messages, they are simply there to test that you are making your API requests properly. Also note that they only work with specific numbers and only on a few endpoints.

从Twilio发送短信,您需要购买Twilio的号码并将其用作您的发件人"号码.您的电话号码看上去好像不是Twilio电话号码.您可以从Twilio控制台购买号码.

In order to send SMS messages from Twilio, you need to buy and use a number from Twilio as your "From" number. Your number there doesn't look as though it is a Twilio number. You can buy numbers from your Twilio console.

我的猜测是您正在向美国号码发送邮件.恐怕字母数字发送者ID在美国不起作用,您可以

My guess is that you're sending messages to US numbers. Alphanumeric sender IDs don't work in the US I'm afraid, you can see the countries that support it here.

最后,如果您想验证用户的号码,是否已经签出 Authy ?他们使用API​​进行电话验证,以及两因素验证.

Finally, if you're looking to verify your users' numbers, have you checked out Authy? They do phone verification as an API, as well as two factor authentication.

让我知道这是否有帮助.

Let me know if this helps at all.

这篇关于Twilio-发件人电话号码xxx不是有效的,支持SMS的入站电话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆