Enter your keyword

Solving Global SMS OTP Delivery Challenges: A Twilio Verify Case Study

Solving Global SMS OTP Delivery Challenges: A Twilio Verify Case Study

Howdy! In this post I will explain the challenge if sending SMS OTP worldwide and how this can be fixed.

Problem statement

Various international customers repeatedly complain they do not receive OTP via SMS. Debugging this problem takes a lot of time as you need to debug at app level, SMS provider level and the carriers globally.

Most likely this will take several days and would not be fixed.

Root cause

The main problem is the legislation of different countries related to SMS delivery. Generally, each country would have a version of below:

  • Privacy Laws: Many countries have strict privacy laws that regulate how personal data, including phone numbers, can be used and stored. For example, the General Data Protection Regulation (GDPR) in the European Union.
  • Anti-Spam Regulations: Most countries have regulations in place to prevent spam messages. For example, the CAN-SPAM Act in the United States.
  • Opt-in Requirements: Some countries require recipients to opt-in before receiving marketing messages.
  • Content Restrictions: Certain countries have restrictions on the type of content that can be sent via SMS, such as political messages or adult content.
  • Sender Identification: Some countries require the sender to be identified in the message, either through a specific format or by providing contact information. Do
  • Not Disturb Lists: Some countries maintain lists of phone numbers that have opted out of receiving marketing messages, and it is illegal to send messages to these numbers.
  • Carrier Regulations: Carriers in different countries may have their own regulations and requirements for sending SMS messages.

As a developer, keeping track of above for each country is painful and nearly impossible.

Solution

After various investigation and testing, I’ve come across Twilio verify which does the job.

Twilio has agreements with carriers globally and a set of pre-defined rules for each of them. It provides an easy API to generate and send OTP and takes the responsibility to dispatch the SMS based on the country you are sending. Thus, you don’t need to worry about each country’s format / legislation.

Limitation

Since Twilio will format and send the SMS, you don’t have much control about the content and you cannot write very specific text.

Benefits

  • The support team, even the free tier is extremely responsive and helpful
  • The APIs are easy to use and documented
  • The support team goes the extra mile to solve your issues and meet your demands. E.g., I have even been able to get a custom sender ID when sending SMS to China. That’s something unimaginable.
  • Handles the regulatory and compliance management for each country
  • Supports multiple channels including SMS, WhatsApp, voice..

Test results

In the countries below, I have used existing customers which do not receive OTP on production with the previous platform and compared with different vendors/alternatives.

CountryVendor 1 Old VendorTwilio SMSVendor 2 Alternative vendorTwilio Verify
MadagascarNoYesNoYes
SeychellesNoNoNoYes
ChinaNoNo Yes
South AfricaNoYes Yes
SingaporeNoYes Yes

I also tested above during live customer calls and confirm the messages are delivered instantly, even to complex jurisdictions like China.

Read more

https://www.twilio.com/en-us/user-authentication-identity/verify
https://www.twilio.com/docs/verify/authentication-channels