Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

Use RCS messaging with Studio



Overview

overview page anchor

To route RCS messages through your Studio logic, connect your RCS sender to a Studio Flow. You can create this connection by adding your Flow webhook URL to your RCS sender configuration in Twilio Console.

With RCS support in Twilio Studio, you can:

  • Start Studio Executions from inbound RCS messages using these trigger types:
    • Incoming Message
    • Incoming Conversation Message
  • Send outbound RCS messages from any Studio Flow (including from API-triggered Executions) using these widgets:

We also recommend setting up SMS fallback by adding your Flow to the Messaging configuration for your RCS Twilio phone number. SMS fallback lets Twilio deliver messages as SMS if a recipient can't receive RCS messages. This option is available only if you use RCS with a Messaging Service as the sender.


Before you can enable RCS messaging for your Studio Flow, you must have set up and configured RCS for your account.

If you want to use SMS fallback, make sure you created a Messaging Service as part of your RCS setup and completed the A2P 10DLC registration process(link takes you to an external page) to send messages in the US.


Connect your Studio Flow to an RCS sender

connect-your-studio-flow-to-an-rcs-sender page anchor

After you've created a Studio Flow, connect it to an RCS sender so the Flow can support RCS messaging.

Get your Flow webhook URL

get-your-flow-webhook-url page anchor
  1. In Twilio Console, go to Studio > Overview(link takes you to an external page).
  2. Open your Flow, then click Publish.
  3. On the canvas, click the trigger, then copy the Webhook URL. The value should look similar to https://webhooks.twilio.com/v1/Accounts/ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/Flows/FWxxxxxxxxxxxxxxxxxxxxxxxxxxx.

Add your Flow webhook URL to the RCS sender configuration

add-your-flow-webhook-url-to-the-rcs-sender-configuration page anchor
  1. In Twilio Console, go to RCS > Senders(link takes you to an external page), then select your sender.
  2. On the Configuration tab, paste the webhook URL you copied from Studio into the following fields:
    • Webhook URL for incoming messages
    • Status callback URL

Your RCS sender is now connected, and inbound messages to that sender trigger your Studio Flow. If your goal is to to use RCS with Programmable Messaging, and you don't need SMS fallback, your setup is complete.

If you're using RCS with Conversations, or if you want to set up SMS fallback for your Messaging Service, continue to the following sections.

Connect your Flow to an RCS sender address for Conversations

connect-your-flow-to-an-rcs-sender-address-for-conversations page anchor
  1. In Twilio Console, go to Conversations > Addresses > Configure addresses(link takes you to an external page), then edit your RCS service.
  2. On the Address configuration tab, in the Want to set up an integration? section, click Studio.
  3. Select your Flow from the list.

We recommend setting up SMS fallback so that if a recipient can't receive RCS, Twilio can deliver messages using SMS instead. For SMS fallback to work properly:

  • You must have set up a Messaging Service.
  • The sender pool for your Messaging Service must include both your RCS sender and an SMS-capable sender.
  • If you want to send messages in the US, you must have completed A2P 10DLC registration for your SMS sender.

To configure SMS fallback, connect your Studio Flow to the phone number associated with your RCS sender.

  1. In Twilio Console, go to Phone Numbers > Manage > Active numbers(link takes you to an external page), then select your phone number.
  2. On the Configuration tab, in the Messaging Configuration section, complete these fields:
    • Messaging Service: Select the service that contains your RCS sender.
    • Configure with: Leave this field set to Webhook, TwiML Bin, Function, Studio Flow, Proxy Service.
    • When a message comes in: Set to Studio Flow, then select the Flow you want to connect.
    • Primary handler fails: Set to the same Flow you selected in the previous field.

How RCS messaging works in Studio

how-rcs-messaging-works-in-studio page anchor

Learn how Studio handles different RCS configurations for inbound and outbound messages.

Receive RCS messages from an inbound Flow

receive-rcs-messages-from-an-inbound-flow page anchor

If your RCS sender is linked to a Messaging Service, Studio treats RCS and SMS messages from the same end-user phone number in a similar way. This allows for seamless SMS fallback and keeps replies in the same Execution.

In the message data, you'll notice the following:

  • The user's address (represented by the Contact variable {{contact.channel.address}} or the to parameter in a Studio API call) doesn't include the rcs: prefix before the number.
  • The flow address (represented by the Flow variable {{flow.channel.address}} or the from parameter in a Studio API call) is the Messaging Service SID.

By default, the Send Message and Send & Wait For Reply widgets send messages using the Messaging Service. If the recipient's device supports RCS, the message is sent using your RCS sender. Otherwise, it's sent using your SMS sender.

If your RCS sender isn't linked to a Messaging Service, both the user and flow addresses include the rcs: prefix, since the message can only be sent as RCS.

Send RCS messages from an API-triggered Flow

send-rcs-messages-from-an-api-triggered-flow page anchor

To send an outbound RCS message, use the Execution resource to create a new execution. When you pass the request body, the pattern for the to and from parameter values depends on whether you're using a Messaging Service and have SMS fallback configured.

These patterns are possible, depending on your RCS setup.

Messaging Service without SMS fallback

messaging-service-without-sms-fallback page anchor
1
{
2
"To": "rcs:+15551234567",
3
"From": "MG11111111111111111111111111111111",
4
}

This pattern sends the message as RCS only. However, SMS replies from the recipient continue the same Execution.

1
{
2
"To": "rcs:+15551234567",
3
"From": "rcs:your_sender_id",
4
}

This pattern sends the message as RCS only, and SMS fallback doesn't work, even if the RCS sender is associated with a Messaging Service. If the recipient replies with SMS, a new Execution is created, and the original Execution is stuck unless the end user replies with RCS again.

Because of potential stuck messages, we don't recommend this pattern. We recommend using a Messaging Service SID as the From address instead.


If an RCS message doesn't reach your Flow, check the following:

  • Confirm the RCS sender's Incoming Messages and Status callback webhooks point to your Studio Flow.
  • If using SMS fallback, confirm the underlying phone number's Messaging webhooks also point to the Flow.
  • Make sure your account is enabled for RCS in Studio.
  • If RCS can't send or the user turns off RCS mid-flow, you may see "Delivery Failure" or "Failed to Send" error (for example, Twilio Error 63036).
  • You can't use Twilio numbers as RCS test devices. To test your setup, use an Android device that you allowlist during RCS onboarding.