Skip to main content

Twilio Connector

Twilio Twilio is a cloud communications platform for sending SMS text messages and other programmable messaging. This component allows sending SMS messages, retrieving message records, and reacting to Twilio events from within an integration.

API Documentation

This component was built using the Twilio Programmable Messaging API (API version 2010-04-01).

Connections

API Key

Authenticate requests to Twilio using an API key and secret.

This component authenticates with Twilio using an API key and secret pair generated from the Twilio console.

Prerequisites

  • A Twilio account with access to the Twilio Console
  • Permissions to create API keys for the account

Setup Steps

  1. Sign in to the Twilio Console
  2. In the top-right of the screen, click Account -> API Keys & Tokens
  3. Select Create API Key
  4. Enter a descriptive name for the key and select Standard for Key type
  5. Take note of the API key's SID and Secret (the secret is only shown once)
  6. From the Twilio console, locate the Account SID (it starts with AC)

Configure the Connection

Create a connection of type API Key and enter the following values:

  • Account SID: The Twilio Account SID, which starts with AC (for example, ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX)
  • API Key SID: The API Key SID created in the previous step, which starts with SK (for example, SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX)
  • API Key Secret: The secret generated when the API key was created
Store the Secret Securely

The API key secret is only displayed once at creation time. Save it in a secure location before leaving the page.

InputCommentsDefault
Account SIDThe Twilio Account SID (starts with AC).
API Key SIDThe API Key SID (starts with SK).
API Key SecretThe API secret generated when the API key was created.

Basic Authentication

Authenticate requests to Twilio using an Account SID and Auth Token.

When a Twilio account is created, an Account String Identifier (Account SID) and Auth Token are generated automatically. The Account SID and Auth Token can be used to authenticate with Twilio and send SMS messages.

Prerequisites

Setup Steps

  1. Sign in to the Twilio Console
  2. From the Account Info panel on the dashboard, locate the Account SID (starts with AC) and the Auth Token
  3. Copy both values for use in the connection configuration

Configure the Connection

Create a connection of type Basic Authentication and enter the following values:

  • Account SID: The Twilio Account SID, which starts with AC
  • Auth Token: The Auth Token shown in the Twilio Console
Consider API Keys instead

For security reasons, the API Key Connection is recommended over Basic Authentication. API keys can be revoked independently, and auth tokens generated using API keys are short-lived.

InputCommentsDefault
Account SIDThe Twilio Account SID (starts with AC).
Auth TokenThe Auth Token from the Twilio Console.

Triggers

New and Updated Records

Checks for newly sent Twilio messages on a configured schedule. Returned messages appear in the created bucket; the updated bucket is preserved for shape parity but is always empty because Twilio polling does not detect status changes to already-sent messages.

InputCommentsDefault
ConnectionThe Twilio connection to use.
From FilterThe sender phone number to filter polled messages by, in E.164 format. Leave blank to include all senders.
To FilterThe recipient phone number to filter polled messages by, in E.164 format. Leave blank to include all recipients.
Show New RecordsWhen true, newly sent messages are included in the trigger output.true
Show Updated RecordsReserved for shape consistency with other polling triggers. Twilio polling does not detect status changes to already-sent messages (use the webhook trigger for status callbacks). The 'updated' bucket is always empty.true

Webhook

Receive and validate webhook requests from Twilio for manually configured webhook subscriptions.

Actions

Get SMS

Retrieve an SMS message by SID.

InputCommentsDefault
ConnectionThe Twilio connection to use.
Message SIDThe unique identifier for the SMS message.

List SMS Messages

List SMS messages from the Twilio account.

InputCommentsDefault
ConnectionThe Twilio connection to use.

Raw Request

Send a raw HTTP request to Twilio.

InputCommentsDefault
ConnectionThe Twilio connection to use.
URLInput the path only (/Accounts/$TWILIO_ACCOUNT_SID/Messages.json), The base URL is already included (https://api.twilio.com/2010-04-01). For example, to connect to https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Messages.json, only /Accounts/$TWILIO_ACCOUNT_SID/Messages.json is entered in this field.
MethodThe HTTP method to use.
DataThe HTTP body payload to send to the URL.
Form DataThe Form Data to be sent as a multipart form upload.
File DataFile Data to be sent as a multipart form upload.
File Data File NamesFile names to apply to the file data inputs. Keys must match the file data keys above.
Query ParameterA list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.
HeaderA list of headers to send with the request.
Response TypeThe type of data you expect in the response. You can request json, text, or binary data.json
TimeoutThe maximum time that a client will await a response to its request
Retry Delay (ms)The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled.0
Retry On All ErrorsIf true, retries on all erroneous responses regardless of type. This is helpful when retrying after HTTP 429 or other 3xx or 4xx errors. Otherwise, only retries on HTTP 5xx and network errors.false
Max Retry CountThe maximum number of retries to attempt. Specify 0 for no retries.0
Use Exponential BackoffSpecifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored.false

Send SMS

Send an SMS message via Twilio.

InputCommentsDefault
ConnectionThe Twilio connection to use.
ToThe SMS recipient's phone number in E.164 format.
FromThe SMS sender's phone number in E.164 format.
MessageThe text content of the SMS message to send.