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

Chapter 5. Twilio in your language

In this chapter, we'll get to grips with working with Twilio in languages other than PHP, looking at all six of the remaining API libraries:

  • Ruby

  • Python

  • C#

  • Java

  • Node

  • Apex (Salesforce's proprietary language)

For each library, we'll learn how to install it, how to instantiate the REST API client, and will briefly see how the syntax of its calls compare with the PHP library we've used throughout the book. We'll also have a quick recap of the PHP library for ease of comparison.

All of the code samples are named, and can be found in the code samples downloadable from Packt's website.

Note

As a general rule, it's bad practice to include your account SID and auth token in your code for security reasons. These should be set in TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN environment variables and then used in your code.

You can find helpful examples on setting environment variables in different platforms at https://github.com/twilio/starter-ruby/blob/bc41654418c21576f63d95e15cb96c744e555fff...