Twilio

FREE
By doctorcrowe
Updated 5 months ago
Communication
-/10
Popularity Score
-
Latency
-
Success Rate

Twilio API Documentation

Twilio powers the future of business communications, enabling phones (SMS, calls), VoIP, and messaging to be embedded into web, desktop, and mobile software. We take care of the messy telecom hardware and expose a globally available cloud API that developers can interact with to build intelligent & complex communications systems. As your app’s usage scales up or down, Twilio automatically scales with you.

View API Details
POSTMake a call
POSTSend SMS
POSTMake a call
Authorization:

AuthSid:Auth Token from https://www.twilio.com/user/account

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
AuthorizationBASIC
REQUIREDAuthSid:Auth Token from https://www.twilio.com/user/account
Required Parameters
FromSTRING
REQUIREDThis needs to be a verified number (FREE TRIAL). More details here - http://www.twilio.com/docs/api/rest/making-calls#url-parameter-request-parameters
ToSTRING
REQUIREDThis needs to be a verified number (FREE TRIAL). More details here - http://www.twilio.com/docs/api/rest/making-calls#url-parameter-request-parameters
UrlSTRING
REQUIREDMore details here - http://bit.ly/1900kmW
accountsidSTRING
REQUIREDGet this from https://www.twilio.com/user/account
Code Snippet
unirest.post("https://twilio.p.rapidapi.com/{AccountSid}/Calls.json")
.header("X-RapidAPI-Host", "twilio.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.send("From=+1 (234) 567-8901")
.send("To=+1 (234) 567-8901")
.send("Url=http://demo.twilio.com/docs/voice.xml")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://twilio.p.rapidapi.com/{AccountSid}/Calls.json
Request Method: POST
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://twilio.p.rapidapi.com/{AccountSid}/Calls.json")
.header("X-RapidAPI-Host", "twilio.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.send("From=+1 (234) 567-8901")
.send("To=+1 (234) 567-8901")
.send("Url=http://demo.twilio.com/docs/voice.xml")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication