Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

Twilio Dev Phone


The Twilio Dev Phone makes it easier for you to test your Twilio apps when you don't have access to SMS and calling capabilities. It uses existing Twilio products to send and receive calls and SMS from your local development environment.

Dev Phone interface with dial pad, call history, and messaging feature.

Install the Dev Phone

install-the-dev-phone page anchor

To use the Dev Phone, you need an installation of the Twilio CLI and access to a spare Twilio phone number. If you use a trial account, upgrade to a paid Twilio account(link takes you to an external page).

After you install the Twilio CLI, add the Dev Phone plugin with the following command:

twilio plugins:install @twilio-labs/plugin-dev-phone

After installation, run the Dev Phone with the following command:

twilio dev-phone

You'll see output that looks something like this:

1
# OUTPUT
2
3
Hello 👋 I'm your dev-phone and my name is dev-phone-XXXXXX
4
5
6
7
✅ I'm using your profile API key.
8
9
10
11
💻 Creating a new conversation...
12
13
I'm using the conversation CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX from service ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
14
15
16
17
💻 Creating a new sync list for call history...
18
19
✅ I'm using the sync service ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
20
21
22
23
💻 Deploying a Functions Service to handle incoming calls and SMS...
24
25
I'm using the Serverless Service ZSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
26
27
28
29
💻 Creating a new TwiML App to allow voice calls from your browser...
30
31
✅ I'm using the TwiML App APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
32
33
34
35
🚀 Your local webserver is listening on port 3001
36
37
🌐 Opening http://localhost:3001/ your browser
38
39
▶️ Use Ctrl+C to stop the Dev Phone

These services are created when you start the Twilio Dev Phone. When you stop it (by pressing CTRL + C), the Twilio Dev Phone will delete the resources from your account. If you can't tear down the Dev Phone, the plugin removes the old resources the next time you run it.


When to use the Dev Phone

when-to-use-the-dev-phone page anchor

You may be wondering: is this the tool that you actually need? Ask yourself: Are you having trouble testing your Twilio app with your personal cell phone? If so, the Dev Phone can help.

Some example use cases include:

  • You don't have access to a Twilio phone number that can send and receive communications from your region (this is often the case for numbers outside of the US and Canada(link takes you to an external page)).
  • You don't have cell service but have a reliable internet connection (for example, you're working in a building with poor coverage, the cell network is down, or you're low on minutes).
  • Your phone is in another room, and you just don't want to go and get it.

In any of these scenarios, you can use the Dev Phone as a replacement for your Twilio phone number.

(warning)

Warning

Using the Dev Phone overwrites a phone number's webhooks, so don't use phone numbers that are already configured. If a number is in production, your customers' communications will appear in the Dev Phone tab in your browser.

Send a Message

send-a-message page anchor
Twilio Dev Phone interface showing SMS input and send button.

To send a message, fill out the Destination number field. Then, type in a message in the SMS interface (on the lower right-hand corner of the Dev Phone) and then click "Send".

Dev Phone interface showing keypad and destination number entry.

To make an outbound call, fill out the Destination number field and then click the "Call" button.

Receive Inbound Calls/SMS

receive-inbound-callssms page anchor

To receive inbound calls and SMS, call or text the Dev Phone's configured phone number. Your communications should pass directly through to the Dev Phone, where you can click to accept.


Explore these resources to get more out of the Dev Phone: