Issue
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?
Solution
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.
Answered By - philnash Answer Checked By - Mildred Charles (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.