In this quickstart, we will get you up and running quickly with a sample application you can build on as you learn more about Twilio Client. Sound like a plan? Then let's get cracking!
The first thing we need to do is grab all the necessary information from our Twilio account. To set up our back-end for Twilio Client, we will need four values from our account:
|Account SID||Your primary Twilio account identifier - find this in the console here.|
|Auth Token||Used to authenticate - just like the above, you'll find this here.|
|TwiML App SID||The TwiML application with a voice URL configured to access your server running this app - create one in the console here. Also, you will need to configure the Voice "REQUEST URL" on the TwiML app once you've got your server up and running.|
|Twilio Phone #||A Twilio phone number in E.164 format - you can get one here|
Choose a download package for your server-side language of choice. If you're primarily a front-end developer and don't have a strong preference, Node.js or Ruby will probably get you up and running the fastest.
Follow the instructions in the README for each starter application to configure and run it on your machine, using the four values we created above:
Once you've got your server up and running, you will need to host it somewhere Twilio can access it. You can publish your app to a web hosting provider, or you can run it locally and use ngrok to create a tunnel to your development machine with a publicly accessible URL. See the README above for the specific ngrok instructions for your preferred platform.
Now, configure the Voice "REQUEST URL" on your TwiML App to hit the voice URL on your server. Again, see the README above for platform-specific instructions.
This is where the fun begins! When you visit the homepage of the starter application, you should see a page which looks like this:
You have been assigned a random client name and are ready to make phone calls. You can type in a phone number to make a call, or you can type in the client name of another user. Try opening the app in another browser window and call yourself. Have fun with the audio feedback.
Need some extra help? Send us a note at email@example.com, and we'll make sure to get you running just as quick as we can. Have fun building with Twilio Client, and make sure to let us know what you're building!