Getting Started with Twilio Client

Twilio Client enables web browsers and mobile devices to send and receive voice calls through a two-way streaming audio pipe. Software developers can incorporate communications features like live collaboration, softphones, web conferencing, and click-to-talk into their applications. End users will enjoy more immersive in-app experiences in browsers, smartphones, and connected devices. Every web and mobile application is now a phone.

Client Browser Call Components

Twilio client requires an installed web browser that supports WebRTC, and an internet connection. Before placing and receiving browser calls with Twilio Client, the following will also need to be configured:

  • A Client UI page for placing and receiving calls in your browser.
  • A Client Capability token server that creates tokens containing your Twilio Account SID, and the inbound and outbound calling capabilities granted to your client instance.
    • A TwiML App is required for outgoing calls. This is configured with a voice webhook url that responds with a TwiML <Dial> verb for calling.
    • A Client identifier is required for inbound calls. This is used for forwarding incoming calls to your Client instance with <Dial> and the <Client> noun.

Here’s how these components work together on an outgoing call:

  1. Upon loading the Client UI page, it requests a token from the Capability token server.
  2. The token server responds with the token, at which point the Client UI page is ready to be used.
  3. A valid E.164 phone number is submitted to dial in the UI page, which opens an active connection to Twilio, and sends the number to the TwiML App in your token.
  4. The TwiML App forwards this request to the voice webhook that responds with <Dial> TwiML.
  5. Twilio bridges your Client call to the new outbound call to the submitted phone number.

Setting Up Twilio Client

Twilio Client can be built from the ground-up, or built in to your existing application. For full details, please see the the following Twilio Docs resources:

To get up and running quickly, or just test Twilio Client out, we recommend using the pre-made docs and Twilio Functions resources found in the Twilio Client JavaScript Quickstart.

How Much Does a Client Call Cost?

Client connections to Twilio have a single low per-minute price from anywhere in the world you can connect to Twilio. When placing or receiving calls from other phone numbers or SIP addresses, the standard Twilio voice call pricing would apply for these call legs. For more information, please see our article How Does Twilio Client Pricing Work.

Additional Resources

Have more questions? Submit a request
Powered by Zendesk