![]() In all other countries, if Twilio performs a number lookup and detects that a number is a landline number, Twilio will respond to your API request with an HTTP 400 status and error 21614. The only exception is that short code numbers cannot communicate with landlines under any circumstances, so attempting to send from a short code number to a landline will result in an HTTP 400 status and error 21612. In the United States, Canada, and the UK, Twilio will attempt message delivery to landline devices, as message delivery to landlines is sometimes supported by carriers. This is similar to the lookup functionality offered in Twilio's Lookup API. Step 2: Fetching mobile carrier information on the "To" number (and checking if the "To" is a mobile number)Īfter validating that the format of the "To" number is valid, Twilio will do a lookup on the number to get its mobile carrier information. ![]() If the phone number seems to be valid based on its format, Twilio will move to the next step. If Twilio discovers that the "To" phone number provided cannot possibly exist based on its format, Twilio will respond to your API request with an HTTP 400 response and Error 21211. When you make a POST request to Twilio's REST API, Twilio will check the validity of the "To" phone number in the request. Step 1: Checking to see if the "To" number is valid It is your responsibility to provide accurate data to the best of your ability, and ensure that you are always sending to properly opted-in users as per our Messaging Policy.īelow, we will describe how Twilio validates the "To" phone numbers in your outbound message requests, and what errors you might encounter when you attempt to send to invalid or unreachable numbers. However, we don't guarantee that we will reject all messages to invalid or inactive numbers. We will also reject messages that cannot be delivered due to incompatibility between the "From" and "To" numbers. We try to save you money by rejecting messages to numbers we are certain are incorrect. Yes, Twilio's Programmable Messaging API has phone number validation logic built in.
0 Comments
Leave a Reply. |