Book Image

Twilio Best Practices

Book Image

Twilio Best Practices

Overview of this book

Table of Contents (15 chapters)
Twilio Best Practices
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Interacting with the API


Twilio's REST APIs are accessed over HTTP, that is to say, you make an HTTP request with the appropriate method, which is either GET, POST, PUT, or DELETE, and Twilio responds with data that represents the object you've created, read, updated, or deleted.

Fortunately, Twilio make our lives easier by providing API libraries in a range of languages. These are wrappers around the raw HTTP requests that Twilio understands, letting us interact with the API in a way that fits with the language we're working in.

At the time of writing, first-party API libraries (that is, libraries built by Twilio) are available in PHP, Ruby, Java, C#, Python, Node.js, and Apex (Salesforce's proprietary language). We'll want to use these when working with Twilio in our applications for the sake of simplicity and testability.

When getting started, it can be helpful to get a feel for working with the API by building the actual HTTP requests ourselves. There are a range of great tools for doing...