Dialing into the Twilio API

In this video, Rob Spectre of Twilio alongside Christopher Castiglione show you how to develop an app that hooks into the Twilio API.

In less than 1 hour we build something that every successful startup needs! What’s that you ask? A customer support line to manage all those support calls you’ll be getting. The Twilio Queue (a new feature from Twilio) is the quickest and easiest way to programmatically develop a call queue, and accept incoming calls from customers.

Dialing into the Twilio API from General Assembly on Vimeo.

In this project you’ll…

  • Develop a system where your customers will be able to call your phone number and be placed in a waiting cue
  • Alert your employees that there are customers waiting on the line (in the order the calls were received)
  • Have some fun with the waiting experience. (Because it’s your startup, and while your customers are on hold they shouldn’t be forced to listen to easy-listening Muzak. Unless you want to be ironic, then sure, we get it).

What is Twilio?

Twilio makes it easy for developers to send and receive text messages and make and receive phone calls to build apps that communicate. They ditch the complexity of black box communications hardware and expose a globally available cloud API that developers can interact with to build smart, scalable and fun communications systems.

Basically, it allows you to write code that interacts with mobile phones, SMS, and landlines.  Companies like Ebay, Hulu, Airbnb, Groupme and many more use the Twilio API as a way to embed telephone communications directly into their product.

What are the prerequisites?

1. Terminal – Python comes preinstalled on the Mac OSX and can be accessed using Terminal (Utilities -> Terminal).  You don’t need to be a python programmer to follow along because we’ll be providing the code.  If you are on a Windows machine or you don’t have access to Terminal you can use any shell and install Python: http://www.python.org/getit/

2. Heroku – We wil be using Heroku to deploy our code.  Sign up for a free account at: http://www.heroku.com/

3. Git – Locally install git. You won’t need GitHub or a remote repository: http://git-scm.com/

4. Twilio Account – Register for a free Twilio sandbox account prior to watching the livestream: http://www.twilio.com.

What is the final code?

Rob has posted the example code (with a few more modifications that aren’t in the video) to his github: https://github.com/RobSpectre/Twilio-Queue-Example

Credits & Thanks

Thanks to General Assembly and Rob Spectre of Twilio for making this possible!