1

I am using Twillio API to send SMS to my website users. But there's one issue, I want to check first, if that number is valid or not? Is there any API in Twillio which is used to check validity of 'to' numbers?

4

2 回答 2

3

Twilio developer evangelist here.

We actually do have an API that you can use to check the validity of a phone number. Check out the Lookup API and its documentation. At the basic level it checks to see if a number looks like a valid phone number and gives you the correct national formatting for it. You can also make a request to find out carrier details about the number to see if it is likely to receive SMS messages.

The link that @dhi_m provided is a good resource to find out what Twilio does with a number when sending it a message. Ultimately, the best way to see if you can send a message to a number is to try to send a message. Then you should build in ways to respond if the message is unsuccessful.

于 2015-07-03T08:05:12.137 回答
0

Please check this link, Twilio’s API has basic validation to check whether this number is valid or not.

于 2015-07-03T07:25:30.750 回答