Guide to using the Twilio Virtual Phone
The Twilio Virtual Phone simulates a mobile device. Use it to send and receive messages through the Twilio Console or Twilio Messaging API. The Virtual Phone interface displays messages sent to the Twilio Virtual Phone Number.
Twilio owns the number linked to the Twilio Virtual Phone: +1 877 780 4236.
When you sign up for a free Twilio trial account, Twilio provisions you with a free US toll-free number (TFN). This number works for non-SMS purposes like sending a voice message to your own personal mobile device.
Virtual Phone displays only your messages
Any account can send messages to the Virtual Phone. The Console filters displayed messages in the Console on a per-account basis. Other users can't see messages you send to the Virtual Phone.
Twilio supports four types of phone numbers: TFNs, 10-digit long codes (10DLC), short codes, and alphanumeric codes. Most developers use a TFN or 10DLC as their sender, because they resemble regular telephone numbers.
No phone number can send SMS messages using the US carrier network until US regulators verify or approve that phone number.
If you want to test SMS messaging without verifying a TFN or registering a 10DLC, Twilio provides the [Virtual Phone][vphone]. As your Twilio phone number and the Virtual Phone don't use the US carrier network, no US regulations apply.
To try the Virtual Phone, open the Twilio Console and go to Messaging > Try it out > Send an SMS.
The Send an SMS page splits the interface into two parts.
- On the left side, you act as the sender. You provide data on the recipient, sender, and body of your SMS message.
- On the right side, you act as the receipient.
- The Virtual Phone section displays messages sent to the Virtual Phone number in a simluated mobile device. You can also respond from the Virtual Phone as you would from a physical mobile device.
- The API Explorer section displays the code necessary to send an SMS message through the Twilio API and the API response.
The left side of the page offers two options for recipients: Send to Virtual Phone and Send to personal number.
The form on this tab lets you send a text to the Twilio Virtual Phone number.
- Leave the To box as is. Messages are sent only to the Virtual Phone.
- Leave the Sender type as Phone Number.
- Choose one of your Twilio phone numbers from the Phone number dropdown.
- Right after signing up, this should list only your Twilio TFN. This TFN hasn't been verified.
- Any other number that you own can send to the Virtual Phone.
- Type your test message into the Message box.
- Click Send an SMS.
When sent, a banner displays with the following text:
Test SMS sent. Delivery time may vary based on your location.
To see the message, click on Virtual Phone on the right side of the Send an SMS page.
The API Explorer section displays the SDK code to send an SMS message using the API. You can explore complete examples in the SMS QuickStart Guide.
When you add the recipient, sender, and body of your SMS message, the API Explorer Request box updates its code with those values. In the Response box, the API Explorer displays the Twilio Messaging API response as an HTTP header and JSON document.
Twilio provides the SDK code for the API call in a range of programming languages and one command line tool, curl
. You can't edit contents of either box, but can copy their contents. You can switch among all of the provided languages without needing to resupply data.
To copy the code or response, click the copy button at the right of either box's header.
The following table summarizes your Twilio Messaging options based on your account, sender, and recipient options.
Phone number verified or registered | Account type | Can send to |
---|---|---|
No | Trial | Virtual Phone plus any Twilio phone number |
TFN pending verification | Trial | Virtual Phone, personal mobile number, up to four phone numbers verified with Twilio, plus any Twilio phone number |
TFN pending verification | Paid | Any phone number |
Yes | Trial | Any phone number |
Regardless of how many verified or registered phone numbers your account has, the Virtual Phone provides certain uses.
- Learn about the Twilio Messaging API without investing time in TFN verification or 10DLC registration
- Test multiple SMS apps concurrently with less friction and cost.
- Try out SMS messaging without concern for carrier availability, performance, or cost nor device reception or battery life.
To learn more about what you can build with Twilio Messaging, see these other resources:
- Twilio Messaging sample code for apps
- A vacation rental site. The host confirms a reservation through a text message. It includes a YouTube video.
- An SMS opt-in builder
- An app for omnichannel two-factor authentication.
- The entire CodeExchange.
- The Twilio Developer Docs.