Skip to content

Connecting to Twilio#

First Steps with Twilio#

Set up an account with Twilio.


The pricing for your Twilio account is Pay-As-You-Go.

Rate Limits

Many Twilio products have rate limits to ensure that all customers experience a high level of performance when using Twilio's platform. Please review the specific product API documentation to find rate limits that may apply to your API.

How to Connect DataDistillr to Twilio#

To set up a data source connection for Twilio, you will need to have:

  • A unique name for your data source connection to be used in queries
  • The Account SID generated through your Twilio account
  • The Auth Token generated through your Twilio account

Data Source Form#

To locate the Twilio form, follow the steps in Connecting Your Data to DataDistillr. When you get to the window to choose the data source type, select API as shown below.

Data Source Wizard

On the API screen, select Twilio from the list of API forms.

List of APIs

The following form will appear. Instructions are below on how to find the information required to fill each field on the Twilio API form.

Once you have filled out all the fields, press the green 'Save' button, and your API will be connected!

Twilio Form


Enter any name that will help you recognize this data source from within your query window.

Acceptable Characters Include

  • lowercase alphanumeric characters
  • underscores

Account SID and Auth Token#

On the Twilio homepage click the console tab in the top right corner.

Twilio Home Page

In the console find your Account SID and Auth Token in the Account Info section. Click the copy icon at their righthand side.

Account Pop Up


The table below shows a list of endpoints available to connect within the DataDistillr application. If you need to connect to an endpoint not listed below, please use the Custom API Form.

Endpoint Required Optional Description
calls Returns info on the calls associated with your account.
messages to
Returns info on messages associated with your account

The endpoints above will display as follows in the nav tree once your API has successfully connected.

Twilio Endpoints

Sample Queries#

The following queries are intended to help you get started, and make life simpler querying within your API.

For the following examples, suppose that my Twilio API data source was called myTwilioapi and I want to query an endpoint. The endpoint goes after the Twilio data source name:

FROM Clause

FROM `myTwilioapi`.`<ENDPOINT>`

Get Calls#

This endpoint will retrieve calls associated with your account.

FROM `myTwilioapi`.`calls`
WHERE `boardId` = '1' LIMIT 100

Get Messages#

This endpoint will retrieve calls associated with your account.

FROM `myTwilioapi`.`messages`
  AND `from` = '<SENDER>'
  AND `dateSent` = '<DATE SENT>' LIMIT 100