O'Reilly logo

Twilio Best Practices by Tim Rogers

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with phone numbers, accounts, and usage

Now that we've looked at the core resources of the REST API—the Call and the Message—let's get to grips with some other interesting and useful parts.

Phone numbers

In the API, phone numbers are encapsulated into a number of different types of resources: the AvailablePhoneNumber, the IncomingPhoneNumber, the OutgoingCallerId, and the ShortCode.

Here, we're going to focus on dealing with numbers we'll actually buy through Twilio with AvailablePhoneNumber and IncomingPhoneNumber, but we'll briefly cover the remaining two.

We can purchase phone numbers via our Twilio Dashboard, but there are plenty of use cases where we might want to do this via the API, for instance, where we want to offer on-demand phone ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required