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

Getting started with Twilio Client on iOS and Android


As well as working in web browsers using JavaScript, Twilio Client can also be integrated into native apps for iOS and Android, thanks to Twilio's SDKs for the two platforms.

The structure of these integrations is very similar to what we've already seen. The frontend, that is, the application itself, provides an interface, with a backend server generating tokens and serving up TwiML.

Tip

Capability tokens are generated on a server rather than on the client's device so that you don't have to share your account SID and auth token. This keeps your Twilio credit safe and under your control.

You'll always need a server that creates tokens when clients request for them. This might be written in PHP, or any other language for which Twilio provides an API library. You can even use the code we've already written.

The Client APIs for Android and iOS are very similar to what we've already seen in JavaScript, reusing concepts such as Connection and Device...