Need a way to send an SMS message anywhere in the world without the receiver knowing your phone number? We got you.
Contents
The Problem
There are many VoIP and/or ToIP options available, like Skype, Google Voice, Zoom, or WhatsApp. However, neither option is perfect.
For some, the receiver needs to install the same app. Others require a special license to send SMS messages - especially internationally. Many only let businesses qualify for those special licenses. The rest charge very high rates, like 7.5 cents per message!
So, now what? Send the SMS with our mobile phone and pay roaming charges for texting internationally? Not quite yet.
What is Twilio?
I defer to Twilio for an in-depth explanation of what they do.
To sum, they’re a cloud communications platform that provides various APIs for typical communication methods like voice and text.
It’s easy to assume they’re “just another” VoIP or ToIP service, but there’s a distinct difference. Rather than provide an app for communication, Twilio provides the tools needed to build your own.
The Solution
That’s how we leverage Twilio to solve our problem: we use their tools to send messages through their partner carriers instead of our own.
First, we buy a phone number with the proper capabilities and register our information - if the number requires it. Then we can send SMS messages anywhere in the world using a Twilio number. We can even make phone calls and receive faxes!
Anonymous*
Yes, this is where I explain the reason for the “anonymous” asterisk in the title. To comply with law enforcement and carrier regulations, we have to, in some cases, provide who we are, where we live, or other regulatory information.
For example, numbers in the United States don’t require any information - just billing information. Conversely, numbers in Germany require proof of identity, German address, and birthdate.
The new U.S. A2P 10DLC system requires those sending messages in the U.S. via 10DLC to register Business Profiles in Twilio’s Trust Hub. Hobbyists, independent developers, and small businesses might not need to register. However, those unregistered must pay higher fees due to perceived higher risk as unregistered traffic (more on that later).
None of this information is available to the receiver, of course, but it’s technically not tinfoil hat levels of anonymity.
Still, for the ability to send communications around the world for less than a penny, a bit of privacy is a small price to pay. This price is expressly modest when compared to other services offering business features.
Getting Started with Twilio
At first, Twilio is entirely free as a trial. As expected, there are many limitations for trial accounts. The biggest one is only sending messages to validated phone numbers.
That’s great for running a few tests, but not so great when you need to send a message to a client on the other side of the world who doesn’t know what Twilio is.
That said, upgrading is likely on the radar to get started sending messages.
Warning
While upgrading removes the limitations, it also wipes out the free balance. So, consider getting a test application running first.
Tip
Need a test application to run? I wrote a Python program that texts an umbrella reminder when it’s going to rain. Too excessive? Not to worry, it’s based on a simpler program that texts a string to a specified number.
What About the Price?
I know, a couple of sections ago, I said “less than a penny,” but I meant it literally. There are only three costs: the number, the service, and taxes.
The number costs a monthly fee that can be as low as $1 per month. Phone calls and texts are usually less than a penny per minute/message! As aforementioned, unregistered traffic must pay higher fees per message. Declared Use Case traffic is two-tenths of a cent and Basic / Unregistered traffic doubles at four-tenths of a cent. At still less than a penny per message, staying unregistered as a hobbyist or small business also won’t break the bank. Taxes, of course, vary and get billed monthly.
All told, we can send messages and make calls around the world for an entire month for less than a cup of coffee.
Well, at least until we need to buy another coffee so we can keep using the free Wi-Fi, but I digress.
Sending SMS Messages
Whether we’ve upgraded or not, there are a few ways to send messages.
First, we can straight up use the Programmable SMS API to send messages as a JSON package. Using the API directly works but can be cumbersome. Luckily, there are quick start guides for the most popular languages, like JavaScript, Python, and Java. There are also full tutorials for building web applications for other use cases.
What about sending a quick, one-off message? Well, for those cases, there is the API Explorer. Twilio intended the API Explorer for use as a debugging tool. However, nothing says we can’t use it to interface with the API. Just fill out the fields and click a button to send the message. Then moments later, get the callback response from the API in the same window!
What about sending SMS messages with our phone through Twilio to obfuscate our phone number? Oh, and without writing any code? That’s a bit of a tall order, but Twilio just so happens to have launched Quick Deploy, which does just that!
Head on over to the code exchange and select the desired web application. Select the desired Twilio account and applicable Twilio phone number. Then enter your phone number and click “Deploy your application.” Yes, it’s that easy!
Of course, we can still edit the generated code from within Twilio Functions & Assets to add features. However, for the most part, it works out-of-the-box.
Tip
Use the Lookup API to make sure a number is valid before sending messages. The API Explorer debugging tool outputs an explicit 404 error code for invalid numbers. For example, running this invalid number in the API Explorer (or via cURL):
curl 'https://lookups.twilio.com/v1/PhoneNumbers/183060920299' -u TWILIO_ACCOUNT_SID_HERE:[AuthToken]
returns:
404 - NOT FOUND - The resource wasn't found; did you forget to fill out a parameter? { "code": 20404, "message": "The requested resource /PhoneNumbers/183060920299 was not found", "more_info": "https://www.twilio.com/docs/errors/20404", "status": 404 }
By contrast, the same number in the Number Lookup console returns a much more generic error of:
We were unable to complete your Lookup query. Please try again later or contact support.
For valid numbers, the Number Lookup console returns the same JSON result:
"root":{8 items "caller_name":NULL "country_code":"US" "phone_number":"+18306092029" "national_format":"(830) 609-2029" "carrier":NULL "fraud":NULL "add_ons":NULL "url":"https://lookups.twilio.com/v1/PhoneNumbers/+18306092029" }
But the API Explorer is, once again, more explicit:
200 - OK - The request was successful. { "caller_name": null, "country_code": "US", "phone_number": "+18306092029", "national_format": "(830) 609-2029", "carrier": null, "add_ons": null, "url": "https://lookups.twilio.com/v1/PhoneNumbers/+18306092029" }
Conclusions
Can we send messages internationally while remaining anonymous? Yes, with the above asterisk in mind. While other VoIP or ToIP solutions work and are far less involved, there’s something oddly satisfying about an overkill, DIY solution.
Besides, we don’t spin up a serverless SMS messaging web app because it’s practical, now do we?
$10 Credit with Referral
Are you interested in trying out Twilio for yourself? Sign up with this referral link and get a $10 credit added to your balance when you upgrade! That’s, like, two cups of coffee!
Mar. 8, 2021 Update: Added U.S. A2P 10DLC information and a tip about invalid numbers.
Mar. 28, 2021 Update: Added links to my github repository with example Python applications using Twilio.
Sep. 7, 2022 Update: Fixed update spacing.
This site participates in affiliate programs. In other words, if you click on the above referral link for a free trial and subsequently upgrade, I get a small credit to my account. That helps offset what it takes to maintain this site and is much appreciated.