skip to Main Content

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?

2

Answers


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

    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search