Guide to using the Twilio Virtual Phone
The Twilio Virtual Phone simulates a mobile device in the Twilio Console. To test SMS messaging from the Console or from your application, use the Virtual Phone.
Testing with the Twilio Virtual Phone has the following benefits:
- Try SMS messaging without toll-free verification, A2P 10DLC registration, or other regulatory requirements. Sending messages between your Twilio phone number and the Virtual Phone doesn't require any regulatory compliance.
- Test multiple SMS apps at the same time. Toggle between senders that include your Twilio phone numbers or a configured Messaging Service.
- Test SMS messaging without worrying about carrier network or recipient device issues.
The Virtual Phone displays only your messages
Other users can't see messages you send to the Virtual Phone. Twilio filters messages by account.
The Virtual Phone interface displays messages sent to the Virtual Phone's toll-free number: +1 877 780 4236.
You can use your trial account phone number to send SMS messages to the Twilio Virtual Phone. When you sign up for a Twilio free trial account, Twilio assigns you a phone number or directs you to purchase one using your trial balance. The type of number you receive depends on your use case and the country you're based in.
To try the Virtual Phone, open the Twilio Console and go to Messaging > Try it out > Send an SMS.
The Send an SMS page provides sender option forms and SMS testing tools, including the Virtual Phone interface.
- Send to Virtual Phone: Send a message to the Virtual Phone from one of your Twilio numbers, either directly or with a Messaging Service.
- Send to personal number: Send a message to a personal mobile number from one of your Twilio numbers, either directly or with a Messaging Service.
(warning)
Personal number limitations
All country-specific phone number regulations apply. If you have a trial account, Twilio limits the recipients to phone numbers that you verified in your account.
- API Explorer: Displays the SDK code to send the SMS message with the Twilio API using the values in the Send to Virtual Phone or Send to personal number form. After you send the SMS from the form, the API Explorer displays the response. You can't edit API Explorer content directly, but you can change the request language from the menu in the Request box.
- Virtual Phone: Displays messages sent to the Virtual Phone's number in a simulated mobile device. You can also respond to the sender from the Virtual Phone interface. |
Send an SMS to the Twilio Virtual Phone.
-
Leave the To box as is. Messages are sent only to the Virtual Phone's number.
-
Choose the Sender type and then select a Twilio Phone number or a Messaging Service.
-
Type your message in the Message field.
-
Click Send an SMS.
A banner displays a success or an error message. To learn more about errors, click Messaging Logs.
The API Explorer displays the SDK code to send the SMS message with the Twilio API using the values you provide in the Send to Virtual Phone form. The response includes an HTTP status code and the response body in JSON format. For complete examples that show how to send and receive SMS messages from the Virtual Phone, see the SMS developer quickstart.
To see and respond to the message in the Virtual Phone interface, click Virtual Phone.
You can use the Messaging API to send SMS messages between your application and the Virtual Phone or from the command line to the Virtual Phone using curl. Messages you send to the Virtual Phone using the Messaging API display in the Virtual Phone interface on the Send an SMS page.
The API Explorer generates a request using the values you provide in the Send to Virtual Phone form. To change the format of the request, select your preferred language from the Request box menu. Choose from curl or any language supported by a Twilio Helper Library.
- To test the request in your application, click Show auth token in the Request box, and then copy the request into your code project.
- To test the request with curl, click Show auth token in the Request box, copy the
curl
command into your terminal, and press Enter to run it.
Don't use your Account SID and Auth token in production apps
For authentication in production apps, use API keys. To test on a local machine, you can use your Account SID and Auth token.
For complete code examples that show how to send messages between an application and the Virtual Phone, see the SMS developer quickstart.
- Try the SMS developer quickstart or SMS no-code quickstart.
- Learn how to make requests to Twilio APIs.
- Explore all the Messaging channels that Twilio supports.