Troubleshooting your Twilio SMS channel

Find solutions for Twilio SMS error

Written By Frieda Yip (Super Administrator)

Updated at November 20th, 2024

The error codes and messages listed in this article might not be up-to-date. For the most updated list of error codes, visit Twilio's documentation here.

 

 

Here is a list of Twilio error codes, their possible causes, and suggested solutions:
 

Error code

Description

Possible cause and suggested solution

21401

The phone number you specified was not a valid SMS-enabled phone number or alphanumeric sender ID.

The phone number or alphanumeric sender ID you provided is not SMS-enabled. Please use an SMS-enabled phone number or alphanumeric sender ID.

21601

Phone number is not a valid SMS-capable/MMS-capable inbound phone number

The phone number you provided in the FROM field is not a valid SMS/MMS-capable inbound number assigned to your account. Use a Twilio-purchased number to send messages.

21608

Phone number is not a valid SMS-capable/MMS-capable inbound phone number

The phone number is not an SMS/MMS-capable inbound number for your account. Verify the number in the Twilio console or upgrade to a full account for unrestricted access.

21609

Phone number is not a valid SMS-capable/MMS-capable inbound phone number

The phone number is not a valid SMS/MMS-capable inbound number for your account. Ensure the URL uses correct protocol, hostname, file path, and URL-encoded query parameters.

21610

The person you are trying to message has opted out of receiving messages from your Twilio phone number, Channels sender, or Messaging Service.

The recipient has opted out of messages from your Twilio sender. Remove them from your list, or ask them to resubscribe by texting “START” to your Twilio number.

21612

The combination of “To” and “From” parameters on this message cannot be connected by Twilio at this time.

The “To” and “From” parameters in this message can’t be connected by Twilio right now. Try again with a different combination, or consult Twilio’s documentation for solutions.

21613

PhoneNumber Requires an Address

Local regulations require an address on file to purchase this phone number. Add an address in your account portal, or choose a number without this requirement using Basic List Filters.

21614

You have attempted to send a SMS with a 'To' number that is not a valid mobile number. It is likely that the number that you have specified is a landline number or is an invalid number.

You attempted to send an SMS to a “To” number that is not valid; it may be a landline or incorrectly formatted. Confirm it is a mobile number using the Lookup API and ensure it’s in proper E.164 format. If it’s an IoT or M2M number, check the format or contact Twilio Support for help.

21615

To purchase this number you must have an Address on your account which satisfies the local address requirements.

To purchase this number, you need an address on your account that meets local requirements. Please add a valid address, or contact Twilio Support for assistance.

21616

The 'From' number matches multiple numbers for your account

The ‘From’ number you provided matches multiple numbers in your account. Please submit the ‘From’ number in E.164 format to resolve this ambiguity.

21617

The maximum allowable body text length is generally 1600 characters, but some special characters such as emojis, emoticons or non-GSM characters will be counted as multiple characters if they have a higher byte count.

 

The message body exceeds the maximum length of 1,600 characters. Special characters like emojis or non-GSM characters may count as multiple characters. Use a text-to-byte calculator to check character space.

21618

The message body cannot be sent

The message body cannot be sent because its content is being filtered by all carriers. We’re monitoring this issue and may route your message through a new carrier if one becomes available.

21620

One or more media URLs that you provided is invalid — they are malformed in some way.

One or more media URLs are invalid. Ensure each URL is properly formatted with the correct protocol prefix (http:// or https://) to resolve the issue.

30001

Twilio queues messages based on the sending rate of a sender or an account. For example a US long code number can send one message segment(link takes you to an external page) per second, and a short code may send over 100 message segments per second.

Messages are queued due to sending rate limits. Use a Messaging Service with multiple senders, increase the Validity Period, or explore short code or toll-free options for higher throughput.

30002

This message failed because your account was suspended after this message was queued but before it was sent by Twilio.

Message delivery failed as your account was suspended after queuing. Contact Twilio support for assistance in resolving the suspension.

30003

The destination handset you are trying to reach is switched off or otherwise unavailable.

The destination device is unavailable or switched off. Check if it has power, signal, or is connected to its home network. Try sending a message from a different number or test with non-Twilio SMS.

30004

Message blocked

Message delivery blocked. Ensure the destination device has signal, is powered on, and can receive SMS. Check for restrictions like opt-outs or being on the Do Not Call registry.

30005

Unknown destination handset

Message delivery failed due to an unknown destination handset. Ensure the number is valid and in E.164 format. Check the device’s signal and ability to receive SMS.

30006

The destination number is unable to receive this message.

The destination number cannot receive messages. Use Lookup to check if it’s a landline. If so, try sending the message to a different type of phone number.

30007

Your message was filtered (blocked) by Twilio or by the carrier. This may be done by Twilio for violating Twilio's Messaging Policy or Acceptable Use Policy, or by a wireless carrier for violating carrier rules or regulations.

Your message was filtered by Twilio or the carrier for policy violations. Check compliance with Twilio’s Messaging and Acceptable Use Policies. Contact support with examples of undelivered Message SIDs

30008

Unknown error

Message delivery failed with an unknown error (30008). Verify the recipient’s phone is on and able to receive SMS, and try sending from a Twilio number. Contact support with recent Message SIDs for assistance.

30009

One or more segments associated with your multi-part inbound message was not received.

One or more segments of your multi-part inbound message were not received. Check network coverage and ask the sender to retry. If the problem continues for multiple users, contact Twilio Support.

30010

You provided the MaxPrice parameter(link takes you to an external page) in your API request. MaxPrice will prevent a message from sending if it exceeds the price you specified.

Message delivery failed because the MaxPrice parameter prevented sending. Increase or remove this parameter, and check for any Unicode characters in the message that may require additional segments

30011

Unable to deliver MMS

MMS delivery failed because the receiving phone number does not support MMS. For inbound messages, let the sender know that MMS is not supported in your region. Check the device settings for outbound.

30012

Unable to deliver message

Message delivery failed because the Time To Live (TTL) specified is too small. Please increase the TTL value in your request to ensure the message remains valid for a longer duration.

30013

Unable to deliver message

Message delivery failed because the Time To Live (TTL) specified is too large. Please reduce the TTL value in your request to meet the acceptable limits.

30014

The To attribute list is invalid or empty

Delivery failed because the "TO" attribute list is invalid or empty. Please check your request to ensure you have included valid recipient numbers.

30015

The To or From attributes have an unsupported prefix for channel

Delivery failed because the TO or FROM attributes have an unsupported channel prefix. Please check the prefixes used in the TO or FROM attributes to ensure they are valid

30016

The To or From attributes have channel prefixes what are incompatible

Delivery failed because the TO or FROM attributes contain incompatible channel prefixes. Please verify the prefixes in the TO and FROM attributes to ensure they are compatible.

30017

A 30017 error is an indicator that the downstream carrier is experiencing performance issues due to high traffic. During times of carrier network congestion, we re-try the request, and return this error if the request is not accepted.

Delivery failed with a 30017 error, indicating high traffic issues with the downstream carrier. To improve delivery, send your messages over a longer period instead of in bursts.

30018

You sent a message (message SID: SMXXXXX) to a mobile number in a country that requires Alphanumeric Sender ID pre-registration. Our records indicate that you do not have a registered Alphanumeric Sender ID for this country. This can result in lower delivery quality.

Message delivery failed because you need a registered Alphanumeric Sender ID for the destination country. Register an Alpha Sender ID to improve delivery. For OTP/2FA, consider using Twilio Verify or Authy.

30019

Message failed because the size of the content associated with the message exceeded carrier limit

Message delivery failed because the content size exceeded the carrier limit. Please ensure that your message size is within the allowable limits set by the carrier.

30020

An internal error has occurred with Message Scheduling that prevented Twilio from processing your request.

Message delivery failed due to an internal error with Message Scheduling. If this issue continues, please contact Twilio support, noting the time of the error and your intended action.