This guide discusses SMS filtering by wireless carriers that can affect delivery of your Twilio Programmable SMS messages. This is often done to comply with state or local regulations, or wireless carriers’ messaging policies.
Filtering of your outgoing Twilio Programmable SMS messages can vary widely between carriers and countries. While this can seem like a black box at times, we have compiled the following information to help you understand why a message might have been filtered.
- Why do wireless carriers have filtering systems?
- How do wireless carriers filter messages?
- How do I know if my messages are being filtered?
- How do I prevent my messages from being filtered?
- United States and Canada SMS filtering
Why do Wireless Carriers have Filtering Systems?
Wireless carriers have filtering systems for two reasons:
1. Enforcing rules or regulations about what types of messaging are allowed to that country or mobile network
Depending on the country, laws or regulations may put restrictions on certain types of messaging, or even forbid certain things altogether.
For example: In the U.S. and Canada, application-to-person (A2P) type messaging is generally not allowed to be sent using local 10-digit long code phone numbers. A2P traffic is supposed to be sent using short codes, and may be subject to filtering when sent via long code. As of August 2019, the only exception is Verizon Wireless with their upcoming “10DLC” A2P long code product. For more details, see SMS Carrier Filtering in the United States and Canada.
2. Protecting mobile subscribers from unwanted messaging such as spam, fraud, or abuse
When mobile subscribers receive messages they find objectionable, they may file complaints, seek damages, or simply stop being a customer. All of these things reduce revenue or increase costs for carriers. Thus, it is in the best interest of carriers to protect mobile subscribers from what they consider to be objectionable content.
How do Wireless Carriers Filter Messages?
There is no standard practice for carrier filtering across all carriers. Filtering can range from a simple static list of prohibited terms, to advanced machine learning systems that constantly adapt based on the messages passing through them. Regardless of the system, carriers keep their filtering systems closely guarded secrets. Due to the ambiguous nature of these filtering mechanisms, Twilio is unable to say definitively how these systems work, or why a particular message was filtered.
How do I Know if my Messages are Being Filtered?
Twilio can't predict filtering, and does not always know for certain when a message has been filtered by a carrier. Some carriers may falsely report filtered messages as delivered to prevent spammers from reverse engineering filtering systems. In other cases, carriers will tell Twilio that a particular message has been filtered. The error code we will use when we know that carrier filtering has taken place is Error 30007: Message Delivery - Carrier Violation.
If Twilio knows that a message has been filtered, we will pass this information to you in two ways:
- By updating the message status to
Undelivered, and flagging error code 30007 in your Programmable SMS Logs.
- Sending a request to your status callback URL, if you provided one when you sent the message.
How do I Prevent my Messages from Being Filtered?
Twilio works hard to keep our customers informed about the rules and regulations affecting SMS around the world.
If you are preparing to launch in a new country, or you suspect your messages are being filtered, first check Twilio’s SMS Guidelines for the country you are sending messages to. Twilio keeps these pages up to date with best practices for each country.
If you are sending A2P SMS to a country where Alphanumeric Sender ID pre-registration is available such as India or Saudi Arabia, this is the best way to avoid filtering. You are likely to experience filtering unless you pre-register a sender ID with Twilio. Please see International Support for Alphanumeric Sender ID for a full list of countries and more information.
You can also greatly reduce the risk of filtering by following these best practices:
Provide a good user experience: Users are likely to report confusing or unwanted messages to their carrier. When these messages are reported to carriers, it becomes very likely that future messages from the same number (or those with similar contents) will be filtered. In some cases, the user may have forgotten that they requested the message, so be sure to identify your business or service in the message. Also, how the message is formatted and written is important. Overly long messages, overly capitalized messages, mysterious links, hyperbole, and using aggressive language can make users suspicious of a message.
Provide clear opt-out instructions: If users do not understand how to opt out (unsubscribe) from your messages, they may feel they have no choice but to contact their carrier to request the carrier block your messages.
For A2P traffic, send via a short code or pre-registered Alpha Sender ID: If you are sending application-to-person (A2P) traffic, the carriers in the country you are sending to may require that this traffic be sent from a short code (What is a short code?) or from a pre-registered Alphanumeric Sender ID, if available. These are both ways that carriers can review your messaging use case in advance, and offer better delivery as a result.
United States and Canada SMS filtering
The landscape of wireless carrier filtering in the U.S. and Canada is changing rapidly. In order to better answer customers' questions, we have created a separate guide. For full details, please see SMS Carrier Filtering in the United States and Canada.
This overview should help to give you a better understanding of how wireless carrier filtering works for Twilio Programmable SMS messages. For more information, please see the following resources: