Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Twilio Best Practices

You're reading from   Twilio Best Practices Learn how to build powerful real-time voice and SMS applications with Twilio

Arrow left icon
Product type Paperback
Published in Dec 2014
Publisher
ISBN-13 9781782175896
Length 178 pages
Edition 1st Edition
Tools
Arrow right icon
Toc

Table of Contents (10) Chapters Close

Mastering call-related APIs

Now that we know in more abstract terms how the Twilio API works and have had an introduction to the PHP library and Postman, let's try our hand at playing with the API for real, starting with the Call resource.

All of our examples will include the URL and parameters you can use with Postman, plus a code sample for the PHP library.

Making a call

To make a call, we'll need to make a POST request to https://api.twilio.com/2010-04-01/Accounts/<your account SID>/Calls.json with the following parameters:

Parameter

Explanation

From

This refers to the phone number that will be used as the caller ID for this call (this must be one of your Twilio numbers or another one you own and have verified with Twilio).

To

This refers to the phone number you need to dial.

Url

This refers to a URL that serves TwiML, which should be used to handle this call. Either this or ApplicationSid must be specified.

ApplicationSid

This refers to the SID of an application...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image