There are several common issues users run into when sending or receiving SMS messages. This guide outlines a few of the most common problems and provides troubleshooting tips:
There are several ways to troubleshoot an undelivered SMS message.
4XXresponse from Twilio’s API, Twilio encountered a problem and wasn’t able to send the message. You can look up the error code you received here.
Failedin Twilio’s logs
Deliveredin the logs but wasn’t sent to the device
There are several questions you should ask if messages are not reaching your Twilio number:
You may see a response from Twilio reading “The message From/To pair violates a blacklist rule” when sending messages. The Twilio API returns this message if you attempt to send an SMS or MMS to a recipient who has previously replied
QUIT to your Twilio number. You will not be charged for this message attempt.
When a user opts out of a phone number that belongs to a Messaging Service, they are also opted out of all messages sent from that particular Messaging Service.
To send messages to such recipients, the recipient must text
YES to your Twilio number to opt in again.
The best way to begin debugging duplicate message issues is to review your message logs. You should look for a record for the message in question, as well as other messages that are duplicates that were sent within seconds of each other.
If you find duplicate messages sent within a few seconds of each other in your logs, it means that Twilio sent multiple messages to the carrier. This almost always means that Twilio received multiple POST requests from your application. Please check the HTTP request logs on your server to further investigate the requests you sent to Twilio.
Instances where Twilio’s system created a duplicate message without receiving a
POST from your application are extremely rare. If you’ve checked your server logs and only see one request to Twilio, please let us know by contacting support with the SIDs of the duplicated messages.
If you find only one message in your logs, it means that Twilio sent just one message to the carrier and the duplication happened on the carrier's end. Users of all types of phones do occasionally receive duplicate messages, typically as the result of a safeguard carriers implement when they suspect there may have been a service disruption. Duplicate messages may also occur when the recipient is roaming.
If duplicate messages occur for an extended time over several different recipient carriers, please let us know by collecting the message records of the duplicated SMSes and contacting support.
To troubleshoot issues with delayed messages or other delivery issues, start by testing your numbers with the API Explorer. Create a message, filling out the
Body fields and any other relevant fields. Click ‘Make Request’ and keep the page open so you can examine the response later.
When you send a message via the API Explorer, one of three things will happen:
201response, check the following:
404response Twilio was not able to send the message.
404response should include an error code and a link to a detailed description of the error code. You can find information on all of our error codes here.