Rate this page:

Twilio Channels

Public Beta

Some Twilio Channels are currently available as a Public Beta product. This means that some features are not yet implemented and others may be changed before the product is declared as Generally Available.

Public Beta products are not covered by a Twilio SLA.

Channels are the collection of third-party integrations that let you send and receive messages on multiple channels with the Twilio APIs you already use. Using Channels with Twilio makes it easy to reach your customers on new platforms, such as Facebook Messenger, WhatsApp, and more.

Channels are available through the Twilio Marketplace; you can choose from a list of verified Channels and install them in a single click. Once installed, they allow you to send and receive messages with other communications platforms using the Twilio API.

Supported Products

Twilio Channels are currently supported by Programmable Messaging and Notify. Click here to install specific Channels or request access to Channels in Developer Preview.

Channels in Public Beta:
Facebook Messenger

Terms of Service

Channels are provided and supported by Channel providers in the Twilio Marketplace. As a part of the Channel installation process, you will be required to accept the Channel provider’s Terms of Service. Note that the Channel is provided under the Partner’s Terms of Service & Privacy policy. Channel-specific documentation can be found inside the Console under the Channel's catalog page.

Setup and Configuring a Channel

Installing a Channel

Getting started with Channels is simple. Available Channels are listed in the Channels Catalog inside the Console. To get started, click on the Channel and install it. This creates an instance of the Channel that you can configure with a Unique Name and enable for use in one or more Twilio products.

Using the WhatsApp API with Twilio

Twilio's support for the WhatsApp Business API is now Generally Available. To get started, see the API docs here.

Authentication with Channel Provider & Configuration

In order to send and receive messages from a Channel, you must have an account set up within the specified platform. You will then authorize Twilio to send and receive messages on your behalf, thereby enabling access to each platform through the Twilio API.

Once a Channel is enabled, the next step is to authenticate the Channel instance with the Channel provider. This also links the Channel instance to a Channel-specific endpoint (such as a Facebook page) within that Channel. The specifics of this vary from Channel to Channel; please refer to Channel-specific documentation on the Channel detail page inside the console.

Once a Channel is authenticated, you can now configure it to work with a Twilio API :

Configuration Parameter Description
Channel address This is a unique identifier for the user facing Channel endpoint such as a Facebook Page. Channel addresses take the form of channel-provider:identifier. For instance, the Channel address for a Facebook Channel is messenger:<page id>. This can not be changed by the end user.
Callback URL A URL where Twilio will POST each time a message is received by Twilio. The format of this request is the same as Twilio's Inbound SMS TwiML Request. Non-relative URLs must contain a valid hostname (underscores are not allowed).
Callback Method Method to use with Callback URL. GET or POST.
Fallback URL Fallback URL to which Twilio will POST if the Callback URL above returns an error.
Fallback Method Method to use with Fallback URL. GET or POST.
Status Callback URL A URL where Twilio will POST each time your outbound message status changes to one of the following: failed, sent. Twilio will POST the standard TwiML request parameters as well as standard Status parameters : MessageStatus and ErrorCode.
Non-relative URLs must contain a valid hostname (underscores are not allowed).
Status Callback Method Method to use with Status Callback. GET or POST.

Creating multiple instances of a Channel

Twilio supports creating multiple instances of a Channel so that your application can use different Channel-specific endpoints. For example, this allows you to support sending/receiving messages from multiple Facebook pages, by creating and associating each Facebook page with an instance of the Facebook Channel.

Using the Channel

You use the same Twilio product APIs to send and receive messages from Channels. All you need to do is reference the Channel address you configured when you installed the Channel.

Once the Channel is configured, you need to select the Twilio product you would like to use the Channel with by checking the appropriate product checkbox under "Use In".

Channel Addresses

Each Channel uses a different unique identifier scheme to address users. The table below lists how users are identified by each supported Channel when used with Twilio APIs. For more details on endpoints and addresses for a given Channel, please refer to Channel-specific documentation on the Documentation page linked to from the Channel detail page inside the console.

Channel Channel endpoint visible to end-user Channel endpoint address Channel user address Notes
Facebook Messenger Facebook Page messenger:{page-id} messenger:{messenger id} Messenger ID is different from a Facebook ID, and is specific between the Messenger User and your Facebook Page. It can only be retrieved when the Facebook Messenger User sends you a message.

The WhatsApp Business API with Twilio

See the table below for the addressing scheme for WhatsApp:

Channel Channel endpoint visible to end-user Channel endpoint address Channel user address Notes
WhatsApp Business phone number whatsapp:{e164 formatted phone number} whatsapp:{user's e164 formatted phone number} See here to get started with WhatsApp.

Programmable Messaging

In order to use a Channel with Twilio's Programmable Messaging, you need to check the "Use In: Programmable SMS Inbound" checkbox.

Sending a Message

See the REST API: Sending a SMS or MMS or REST API: Messages page for details on how to use Channels via Programmable Messaging APIs to send a message.

Here's an example of how you can send a message to Facebook Messenger using Programmable SMS:

curl -X "POST" \
--data-urlencode 'To=messenger:{Messenger User ID}' \
--data-urlencode 'From=messenger:{Facebook Page ID}' \
--data-urlencode 'Body=Would you like to play a game?' \
-u {Account Sid}:{Auth Token} \{AccountSID}/Messages.json

Receiving a Message

In order to receive a message from a Channel that supports Programmable Messaging, set the Callback URL under Configuration section once the Channel has been installed. This URL will receive a callback with the same format as Incoming SMS TwiML Callbacks.

Managing Opt-Ins, Opt-Outs, and Consumer Preferences

Just like you are required to manage consumer opt-ins for your SMS applications, you are also responsible for managing consumer opt-ins to OTT platforms. Users of your application must explicitly grant you permission to message them in each unique channel. For example, consent to send someone a text message does not grant you permission to contact them via Messenger.

Similarly, you should respect consumers who opt-out on each platform. Each platform has its own method of opting out, which Twilio will normalize for you as much as possible. For example, consumers may text STOP to opt-out of SMS, or they may block your application to stop messaging within an OTT channel. If a user opts out of one communication channel, you are NOT required to opt them out of all channels. You may treat each opt-in and opt-out independently.

Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Community Forums or browsing the Twilio tag on Stack Overflow.


        Thank you for your feedback!

        We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

        Sending your feedback...
        🎉 Thank you for your feedback!
        Something went wrong. Please try again.

        Thanks for your feedback!

        Refer us and get $10 in 3 simple steps!

        Step 1

        Get link

        Get a free personal referral link here

        Step 2

        Give $10

        Your user signs up and upgrade using link

        Step 3

        Get $10

        1,250 free SMSes
        OR 1,000 free voice mins
        OR 12,000 chats
        OR more