If you’ve ever sold anything on Craigslist, requested a quote on the internet, engaged in online dating, or watched The Wire, then you may have found yourself wishing for a burner phone or a disposable phone number. Even developers need virtual phone numbers to test mobile apps without sending SMS messages to their real phone numbers.
In this post, we’ll use TwiML Bins to create a temporary phone number that forwards phone calls to your cellphone. This will take less than 3 minutes, even if you’ve never written a line of code before!
How to Set up a Temporary Phone Number
Sign up for a free Twilio account if you don’t already have one. Then, go to Developer Tools in your console and click on TwiML Bins. TwiML is a simple set of instructions used to program your Twilio number. TwiML Bins let you host static TwiML without setting up a server of your own.
Create a TwiML Bin. Name it “Forward to my cellphone.” Copy this code to your cellphone number when a call comes in.
<Response> <Dial>312XXXXXXX</Dial> </Response>
Buy a Temporary Cell Phone Number
Congrats! You just wrote some TwiML! Now you just need to buy a programmable phone number to work with the SMS service:
- Go to your Phone Numbers Dashboard.
- Click Buy a Number.
- Search for a number that suits you.
- Click Buy
- Confirm your purchase, then click Setup Number.
If you need your number to work internationally in Canada, the United Kingdom, China, or other different countries, Twilio has a variety of toll-free, mobile, local, national, Short Codes, Alphanumeric Sender IDs, caller IDs, and more.
All that’s left is to tell Twilio where to find instructions on what to do when someone calls this temporary phone number. Under Messaging, look for the line that says “A message comes in.” Change the first box to “TwiML” and the second to “Forward to my cellphone,” then save your configuration.
That’s it! Borrow a friend’s cellphone and call your Twilio number. A few seconds later, your iPhone or Android should light up. You now have a temporary phone number you can give out to the Internet without concern.
Receive SMS Online
You can now use your new number to receive SMS online(Tinder, PayPal, WhatsApp, Google Voice, etc.) . Instead of using your real mobile phone number to sign up for services, use this temporary number instead. If your number is ever compromised (starts receiving too many robocalls or spam), you can just delete the temporary phone number and get a new one.
If you don't want to give a website your personal number, but they require it for SMS verification to send a verification code, use your temporary phone number.
The best part about using a second phone number is that your personal number is always protected—no having to text your family, friends, and coworkers with your new mobile number. You'll just have to be careful with who you give your primary number.
Next Steps After Creating a Temporary Phone Number
Call forwarding and disposable numbers are just the beginning of what you can do with TwiML Bins and programmable phone numbers. For more ideas check out:
Also, if you’re looking for a more robust temporary phone functionality, check out Burner App which uses Twilio to give you a temporary phone number that can send and receive text messages and place and receive phone calls.