When you use one of Twilio's API libraries instead of working directly with more low-level HTTP requests, you'll interact with Twilio using simpler code that abstracts away details such as forming URLs, authenticating, and catching errors.
Twilio offers libraries in most major languages, but we'll look at PHP in order to stay in sync with Chapter 1, Working with TwiML.
The principles will be similar if you're using another language, but the syntax and grammar will be different. To see Twilio in action in Ruby, Python, C#, Java, Node.js, and Apex, head to Chapter 5, Twilio in your language.
First, you'll need to download the library. There are two options for doing this, which ...