Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Group Texting in Conversations


Using Twilio Conversations, you can build rich conversations between more than two parties over multiple channels, such as SMS and Chat.

In high-value interactions, such as buying a house, financial advising, and coordinating deliveries, customers expect communication involving a group of participants to be seamless. Good news! Twilio Conversations natively supports Group MMS for you to build these experiences for your end-users.

In this guide, we'll walk you through creating a Conversation that supports group texting.


What is Group Texting?

what-is-group-texting page anchor

Group texting, or more specifically Group MMS, uses the MMS (Multimedia Messaging Service) protocol to exchange ordinary text messages among a group of three or more people, rather than as a one-to-one interaction.

In a Twilio-powered group texting Conversation, all of the Participants are visible, and each Participant can see the author of each message. In other words, each message can be displayed with the person who sent it to the group text. This is the type of functionality that many users already expect from applications such as WhatsApp, Slack, and iMessage.

Even if you have Participants joining across different channels, Twilio Conversations does all of the message routing and media handling.

(information)

Info

Group MMS is in Public Beta, and Twilio is actively tweaking the experience to work better for you.


Leveraging Group MMS in Conversations for group texting

leveraging-group-mms-in-conversations-for-group-texting page anchor

If you're operating in the US or Canada (Group MMS only works on +1 numbers), you can send messages from a projected address to create group texts. This number becomes that Participant's address — the projection of that Participant — into a group MMS Conversation.

You can have the following types of Participants in a group text:

  • A Participant joining from their native texting experience, with simply a messaging address (their personal mobile number).
  • A Chat participant, who has a Chat Identity (like a username) and a projected address (Twilio phone number).
  • An unattached Projected Address (Twilio phone number) with no backing Chat Identity. In this case, the projected address acts like a "gateway" number for a customer to participate in the group text.
(warning)

Warning

Group Texting is only supported on +1 (US+Canada) long code numbers. Toll-free numbers and short codes cannot exchange group texts from Twilio.

(information)

Info

There is a limit of 10 total Participants in a Group MMS Conversation.


Projected Addresses vs. Proxy Addresses

projected-addresses-vs-proxy-addresses page anchor

If you have built a one-to-one Conversation (like in our Conversations Quickstart), you are probably familiar with the term proxy address: the Twilio phone number that routes all of the messages to the native SMS conversation. The proxy address "sticks" to the mobile-based participant on SMS. You can think of it as their window into the Conversation, which may include another SMS or Chat participant. Notably, the SMS participant receives all of the messages through one proxy address number and doesn't know how many people it represents.

To set up Group texting with Conversations, you should instead use a projected address to represent every Participant who does not join the Conversation through a native channel such as SMS. You can think of the projected address as the "avatar" of a Chat participant in the MMS conversation. The projected address "sticks" to the Chat participant, so in the group text, every Participant can see who said what by way of the attached phone number. The projected address, often used to represent an employee or company representative, is the number that you might put on your business card, for example.

For example, in the following screenshot, you can see the interaction of three unique Participants:

  • The first SMS Participant(1), interacting through the native SMS app on their mobile device.
  • The Projected Address(1), representing a Chat participant.
  • The second SMS Participant(2), represents a different SMS participant and interacts through the native SMS app on their mobile device.

    Conversation between 1 Chat-based Participant with projected address and two SMS Participants joining with their mobile number.

Sharing a Projected Address in group texts

sharing-a-projected-address-in-group-texts page anchor

You can share one Projected Address between multiple participants in the group text Conversation and update the backing identity as necessary. This functionality supports use cases such as transferring between support agents representing a business in a group text.

For example, let's say you need to create a group text with one Projected Address that will represent your business, staffed by multiple agents on Chat. In this case, you add a standalone Projected Address as a Participant and update it with the identity of the first agent. Later, when that agent escalates the issue to their supervisor, you update the Projected Address to the supervisor's Chat identity. From the end-user's viewpoint, they are still communicating with the same phone number (Projected Address) that represents your business.

Using standalone Projected Addresses in group texts

using-standalone-projected-addresses-in-group-texts page anchor

A Projected Address that has no backing Chat identity can still be part of your Conversation.

You can use a standalone Projected Address if you want to send and receive messages in the group text Conversation only through the Twilio Conversations REST API. In this case, when you send messages using the REST API, you'll need to specify the projected address itself as the author parameter.


Conversation autocreation with Group Texting

conversation-autocreation-with-group-texting page anchor

The Conversations API automatically creates a new Conversation when a group message reaches a projected address and there is no existing Conversation with the same group of Participants.

Please see our guide to inbound messaging handling and autocreation in Conversations for more details.

For example, a real estate agent and prospective homebuyer are chatting one-on-one about prospective homes. The homebuyer, wanting to include their partner in the discussion, sends a message to their partner's mobile number as well as the real estate agent, whose avatar in the Conversation is a projected address/Twilio number. No Conversation yet exists between these three numbers, so this creates a new Conversation with all three numbers as separate Participants. In this newly created Conversation, all members see the original message from the homebuyer to the second homebuyer and the real estate agent as the first message.


Walkthrough of two Group Texting examples

walkthrough-of-two-group-texting-examples page anchor

Now that we've covered the concepts of group texting, let's take a look at how we'd set it up for two common scenarios.

(information)

Info

Twilio Conversations is built on top of several Twilio products. It may be useful to pull up a document or sticky note to keep track of the various values that you'll need throughout this documentation. For the examples requiring two SMS Participants, we recommend keeping a friend (or just their phone) handy for testing.

Get started: Acquire an MMS-capable Twilio Phone Number

get-started-acquire-an-mms-capable-twilio-phone-number page anchor

If you haven't already done so, you'll want to purchase a Twilio Phone Number to complete the rest of this guide. If you have a Twilio Phone Number already, you can skip to the next section.

In the Twilio console(link takes you to an external page), search for and purchase an available phone number capable of sending MMS. This Phone Number will serve as the projected address for the Chat participant.

buy-number-mms-capability.

Scenario 1: Set up a group message with one Chat participant and two SMS participants

scenario-1-set-up-a-group-message-with-one-chat-participant-and-two-sms-participants page anchor

This is a common scenario in real estate, where the purchase of a single-family home is often a family decision. We will set up group texting for three Participants:

  • The real estate agent, chatting from within a dedicated real estate customer relations management application.
  • Homebuyer 1, over SMS.
  • Homebuyer 2, over SMS.

To do this, you'll need a Twilio Phone Number and you'll need access to the REST API. We have included code samples in supported programming languages, as well as curl and the Twilio CLI, which makes experimenting a snap.

Step 1: Create the Conversation

step-1-create-the-conversation page anchor

First, we need to create the Conversation by making a request to the Twilio REST API.

Create a Conversation

create-a-conversation page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.conversations.v1.conversations
_10
.create({friendlyName: 'Home-buying journey'})
_10
.then(conversation => console.log(conversation.sid));

Output

_20
{
_20
"sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_20
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_20
"chat_service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_20
"messaging_service_sid": "MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_20
"friendly_name": "Home-buying journey",
_20
"unique_name": null,
_20
"attributes": {},
_20
"date_created": "2020-07-01T22:18:37Z",
_20
"date_updated": "2020-07-01T22:18:37Z",
_20
"state": "active",
_20
"timers": {},
_20
"bindings": {},
_20
"url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_20
"links": {
_20
"participants": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Participants",
_20
"messages": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages",
_20
"webhooks": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Webhooks"
_20
}
_20
}

Step 2: Add the real estate agent

step-2-add-the-real-estate-agent page anchor

Now that we have the Conversation, we can add the real estate agent as a Participant. In this guide, we are representing the Chat Participant's messages with the Conversations REST API to get up and running. At the end of this guide, we'll provide links to documentation to get you started on building a custom CRM.

Add a Chat Participant (Real Estate Agent)

add-a-chat-participant-real-estate-agent page anchor

We'll add the agent using a Projected Address

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_14
// Download the helper library from https://www.twilio.com/docs/node/install
_14
// Find your Account SID and Auth Token at twilio.com/console
_14
// and set the environment variables. See http://twil.io/secure
_14
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_14
const authToken = process.env.TWILIO_AUTH_TOKEN;
_14
const client = require('twilio')(accountSid, authToken);
_14
_14
client.conversations.v1.conversations('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_14
.participants
_14
.create({
_14
identity: 'realEstateAgent',
_14
'messagingBinding.projectedAddress': '+15017122661'
_14
})
_14
.then(participant => console.log(participant.sid));

Output

_17
{
_17
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"conversation_sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"sid": "MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"identity": "realEstateAgent",
_17
"attributes": {},
_17
"messaging_binding": {
_17
"type": "sms",
_17
"projected_address": "+15017122661"
_17
},
_17
"role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"date_created": "2020-07-01T22:18:37Z",
_17
"date_updated": "2020-07-01T22:18:37Z",
_17
"url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Participants/MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"last_read_message_index": null,
_17
"last_read_timestamp": null
_17
}

Step 3: Add the first homebuyer

step-3-add-the-first-homebuyer page anchor

The Chat participant (the real estate agent) has been added to the Conversation, but it's pretty lonely in there with no clients. Next, we need to add the first homebuyer, who joins via the native texting (SMS) app on their phone.

(information)

Info

You only have to specify the SMS participant's own personal phone number in MessagingBinding.Address. When using group texting, you won't need to specify proxy addresses.

Add an SMS participant (Homebuyer 1)

add-an-sms-participant-homebuyer-1 page anchor

Replace the placeholder number with a mobile number

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.conversations.v1.conversations('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.participants
_11
.create({'messagingBinding.address': '+15558675310'})
_11
.then(participant => console.log(participant.sid));

Output

_17
{
_17
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"conversation_sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"sid": "MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"identity": null,
_17
"attributes": {},
_17
"messaging_binding": {
_17
"type": "sms",
_17
"address": "+15017122661"
_17
},
_17
"role_sid": null,
_17
"date_created": "2020-07-01T22:18:37Z",
_17
"date_updated": "2020-07-01T22:18:37Z",
_17
"url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Participants/MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"last_read_message_index": null,
_17
"last_read_timestamp": null
_17
}

Step 4: Send a 1:1 message

step-4-send-a-11-message page anchor

Before our third Participant joins, we can start by sending messages between the two connected Participants. Let's send a message from the agent to the homebuyer using the REST API.

Send a Conversational Message

send-a-conversational-message page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_14
// Download the helper library from https://www.twilio.com/docs/node/install
_14
// Find your Account SID and Auth Token at twilio.com/console
_14
// and set the environment variables. See http://twil.io/secure
_14
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_14
const authToken = process.env.TWILIO_AUTH_TOKEN;
_14
const client = require('twilio')(accountSid, authToken);
_14
_14
client.conversations.v1.conversations('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_14
.messages
_14
.create({
_14
body: 'Hi there. What did you think of the listing I sent?',
_14
author: 'realEstateAgent'
_14
})
_14
.then(message => console.log(message.sid));

Output

_27
{
_27
"sid": "IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"conversation_sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"body": "Hi there. What did you think of the listing I sent?",
_27
"media": null,
_27
"author": "realEstateAgent",
_27
"participant_sid": "MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"attributes": {},
_27
"date_created": "2020-07-01T22:18:37Z",
_27
"date_updated": "2020-07-01T22:18:37Z",
_27
"index": 0,
_27
"delivery": {
_27
"total": 2,
_27
"sent": "all",
_27
"delivered": "some",
_27
"read": "some",
_27
"failed": "none",
_27
"undelivered": "none"
_27
},
_27
"content_sid": null,
_27
"url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"links": {
_27
"delivery_receipts": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Receipts",
_27
"channel_metadata": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelMetadata"
_27
}
_27
}

Once the homebuyer receives the message, you'll be able to verify that from the REST API. Using Conversations Webhooks, you can also capture those responses for whatever you need, such as logging or adding helpful chatbots. If you've built an app out of our Chat SDK, you'll get those messages in real time via Twilio's secure WebSocket gateways.

Step 5: Add the second homebuyer to the group text

step-5-add-the-second-homebuyer-to-the-group-text page anchor

Now it's time to turn this into a true group texting experience by adding the second homebuyer. Just like when we added the first homebuyer to the Conversation, we'll add the second using a REST API call.

Add a second SMS participant to the group text (Homebuyer 2)

add-a-second-sms-participant-to-the-group-text-homebuyer-2 page anchor

Replace the placeholder number with a cellphone number

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.conversations.v1.conversations('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.participants
_11
.create({'messagingBinding.address': '+15558675310'})
_11
.then(participant => console.log(participant.sid));

Output

_17
{
_17
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"conversation_sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"sid": "MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"identity": null,
_17
"attributes": {},
_17
"messaging_binding": {
_17
"type": "sms",
_17
"address": "+15017122661"
_17
},
_17
"role_sid": null,
_17
"date_created": "2020-07-01T22:18:37Z",
_17
"date_updated": "2020-07-01T22:18:37Z",
_17
"url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Participants/MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"last_read_message_index": null,
_17
"last_read_timestamp": null
_17
}

Step 6: Send another message

step-6-send-another-message page anchor

Let's welcome the second homebuyer to the group text with one more message from the real estate agent.

Send a second Conversational Message

send-a-second-conversational-message page anchor

This message will go to all three participants in the group text.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_14
// Download the helper library from https://www.twilio.com/docs/node/install
_14
// Find your Account SID and Auth Token at twilio.com/console
_14
// and set the environment variables. See http://twil.io/secure
_14
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_14
const authToken = process.env.TWILIO_AUTH_TOKEN;
_14
const client = require('twilio')(accountSid, authToken);
_14
_14
client.conversations.v1.conversations('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_14
.messages
_14
.create({
_14
body: 'Glad you could join us, homebuyer 2. I really love these granite countertops and think you will as well.',
_14
author: 'realEstateAgent'
_14
})
_14
.then(message => console.log(message.sid));

Output

_27
{
_27
"sid": "IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"conversation_sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"body": "Glad you could join us, homebuyer 2. I really love these granite countertops and think you will as well.",
_27
"media": null,
_27
"author": "realEstateAgent",
_27
"participant_sid": "MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"attributes": {},
_27
"date_created": "2020-07-01T22:18:37Z",
_27
"date_updated": "2020-07-01T22:18:37Z",
_27
"index": 0,
_27
"delivery": {
_27
"total": 2,
_27
"sent": "all",
_27
"delivered": "some",
_27
"read": "some",
_27
"failed": "none",
_27
"undelivered": "none"
_27
},
_27
"content_sid": null,
_27
"url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"links": {
_27
"delivery_receipts": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Receipts",
_27
"channel_metadata": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelMetadata"
_27
}
_27
}

Now you can see that all three Participants (the real estate agent and the two homebuyers) are part of the Conversation representing our group text. We've been simulating the Chat participant (the real estate agent) using the REST API. However, notice that you and the second homebuyer (or your friend) can use your native texting application to participate in the Conversation as well. The messages flow freely back and forth:

conversations_group_mms_real_estate.

Scenario 2: Set up a group message with two Chat and one SMS participants

scenario-2-set-up-a-group-message-with-two-chat-and-one-sms-participants page anchor

In the first scenario, we created a group texting Conversation between one real estate agent on Chat participant and two SMS participants.

The second scenario is more common when you have one end-user and two employees, as you may see in financial consultations. For this example, we'll set up a Conversation for:

  • The financial advisor, joining from a dedicated application built with Chat.
  • The assistant, also chatting from the same application.
  • The end-user/client, connecting to the Conversation via SMS.

Because this group text involves two different Chat Participants—the financial advisor and the assistant—we will need two projected addresses, one for each of them. If you haven't already done so, purchase an additional Twilio phone number to use as the second projected address.

Use one projected address to transfer between agents

use-one-projected-address-to-transfer-between-agents page anchor

In this scenario, we include one assistant on Chat, who is represented with a Projected Address in the Conversation. If you need to transfer seamlessly, you can update the Projected Address's backing Chat identity to the new assistant. The end-user/client will consistently see the same Projected Address (Twilio Phone Number), even if the assistant on Chat changes behind the scenes.

Optional: Clean up the first Conversation

optional-clean-up-the-first-conversation page anchor

If you continue to the second example in this guide, you'll need two Twilio Phone Numbers. To free up the number you've already purchased, we can delete the Conversation from the first example.

Alternatively, you can purchase two new Twilio Phone Numbers to use as projected addresses in this second example.

Use the CHXXX... SID of the first Conversation

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.conversations.v1.conversations('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_10
.remove();

Step 1: Create the Conversation

step-1--create-the-conversation-2 page anchor

We'll begin this example by making a request to the Twilio REST API to create a new Conversation for the financial consultation.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_12
// Download the helper library from https://www.twilio.com/docs/node/install
_12
// Find your Account SID and Auth Token at twilio.com/console
_12
// and set the environment variables. See http://twil.io/secure
_12
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_12
const authToken = process.env.TWILIO_AUTH_TOKEN;
_12
const client = require('twilio')(accountSid, authToken);
_12
_12
client.conversations.v1.conversations
_12
.create({
_12
friendlyName: 'Your Wealth Management Options'
_12
})
_12
.then(conversation => console.log(conversation.sid));

Output

_20
{
_20
"sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_20
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_20
"chat_service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_20
"messaging_service_sid": "MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_20
"friendly_name": "Your Wealth Management Options",
_20
"unique_name": null,
_20
"attributes": {},
_20
"date_created": "2020-07-01T22:18:37Z",
_20
"date_updated": "2020-07-01T22:18:37Z",
_20
"state": "active",
_20
"timers": {},
_20
"bindings": {},
_20
"url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_20
"links": {
_20
"participants": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Participants",
_20
"messages": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages",
_20
"webhooks": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Webhooks"
_20
}
_20
}

Step 2: Add the financial advisor

step-2-add-the-financial-advisor page anchor

With the Conversation created, we'll next add the financial advisor. This will be a Chat participant, so we need to assign them a projected address. Use one of your Twilio Phone Numbers for this.

Add a Chat Participant (Financial Advisor)

add-a-chat-participant-financial-advisor page anchor

Replace the projected address with one of your Twilio numbers

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_14
// Download the helper library from https://www.twilio.com/docs/node/install
_14
// Find your Account SID and Auth Token at twilio.com/console
_14
// and set the environment variables. See http://twil.io/secure
_14
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_14
const authToken = process.env.TWILIO_AUTH_TOKEN;
_14
const client = require('twilio')(accountSid, authToken);
_14
_14
client.conversations.v1.conversations('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_14
.participants
_14
.create({
_14
identity: 'YourFinancialAdvisor',
_14
'messagingBinding.projectedAddress': '+15017122661'
_14
})
_14
.then(participant => console.log(participant.sid));

Output

_17
{
_17
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"conversation_sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"sid": "MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"identity": "YourFinancialAdvisor",
_17
"attributes": {},
_17
"messaging_binding": {
_17
"type": "sms",
_17
"projected_address": "+15017122661"
_17
},
_17
"role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"date_created": "2020-07-01T22:18:37Z",
_17
"date_updated": "2020-07-01T22:18:37Z",
_17
"url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Participants/MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"last_read_message_index": null,
_17
"last_read_timestamp": null
_17
}

Step 3: Add the end-user (the advisee) by SMS

step-3-add-the-end-user-the-advisee-by-sms page anchor

In this example, we will be adding the end-user (the client being advised) to the group texting experience by making another REST API call.

Because this Participant is joining via the native SMS experience on their device, we'll use their mobile number as the Messaging Binding Address.

Add an SMS Participant (Advisee)

add-an-sms-participant-advisee page anchor

Replace the placeholder with your mobile number

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.conversations.v1.conversations('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.participants
_11
.create({'messagingBinding.address': '+141586753093'})
_11
.then(participant => console.log(participant.sid));

Output

_17
{
_17
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"conversation_sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"sid": "MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"identity": null,
_17
"attributes": {},
_17
"messaging_binding": {
_17
"type": "sms",
_17
"address": "+15017122661"
_17
},
_17
"role_sid": null,
_17
"date_created": "2020-07-01T22:18:37Z",
_17
"date_updated": "2020-07-01T22:18:37Z",
_17
"url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Participants/MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"last_read_message_index": null,
_17
"last_read_timestamp": null
_17
}

Before we add our third Participant to the Conversation, we can make sure the two Participants are connected. We'll use the Conversations REST API to send a message from the Chat-based Financial Advisor to the SMS-based advisee.

Send a Message to the Conversation

send-a-message-to-the-conversation page anchor

This message is from the Financial Advisor to the advisee.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_14
// Download the helper library from https://www.twilio.com/docs/node/install
_14
// Find your Account SID and Auth Token at twilio.com/console
_14
// and set the environment variables. See http://twil.io/secure
_14
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_14
const authToken = process.env.TWILIO_AUTH_TOKEN;
_14
const client = require('twilio')(accountSid, authToken);
_14
_14
client.conversations.v1.conversations('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_14
.messages
_14
.create({
_14
body: 'Hello, what questions did you have about your portfolio?',
_14
author: 'YourFinancialAdvisor'
_14
})
_14
.then(message => console.log(message.sid));

Output

_27
{
_27
"sid": "IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"conversation_sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"body": "Hello, what questions did you have about your portfolio?",
_27
"media": null,
_27
"author": "YourFinancialAdvisor",
_27
"participant_sid": "MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"attributes": {},
_27
"date_created": "2020-07-01T22:18:37Z",
_27
"date_updated": "2020-07-01T22:18:37Z",
_27
"index": 0,
_27
"delivery": {
_27
"total": 2,
_27
"sent": "all",
_27
"delivered": "some",
_27
"read": "some",
_27
"failed": "none",
_27
"undelivered": "none"
_27
},
_27
"content_sid": null,
_27
"url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"links": {
_27
"delivery_receipts": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Receipts",
_27
"channel_metadata": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelMetadata"
_27
}
_27
}

Step 5: Add the assistant to the group text

step-5-add-the-assistant-to-the-group-text page anchor

It's time to add the assistant to the group text as a Chat participant. Recall that every non-SMS participant needs a projected address to join in on the group texting fun.

(information)

Info

In this case, we're adding the projected address with an attached Chat Participant all at once, but you could also create the Conversation with an unattached or "gateway" projected address. When you're reading for the assistant to jump into the group text, you can update the projected address by attaching the assistant's chat identity.

Add a second Chat Participant (Assistant)

add-a-second-chat-participant-assistant page anchor

Make sure to use a different projected address

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_14
// Download the helper library from https://www.twilio.com/docs/node/install
_14
// Find your Account SID and Auth Token at twilio.com/console
_14
// and set the environment variables. See http://twil.io/secure
_14
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_14
const authToken = process.env.TWILIO_AUTH_TOKEN;
_14
const client = require('twilio')(accountSid, authToken);
_14
_14
client.conversations.v1.conversations('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_14
.participants
_14
.create({
_14
identity: 'theAssistant',
_14
'messagingBinding.projectedAddress': '+15017122661'
_14
})
_14
.then(participant => console.log(participant.sid));

Output

_17
{
_17
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"conversation_sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"sid": "MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"identity": "theAssistant",
_17
"attributes": {},
_17
"messaging_binding": {
_17
"type": "sms",
_17
"projected_address": "+15017122661"
_17
},
_17
"role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"date_created": "2020-07-01T22:18:37Z",
_17
"date_updated": "2020-07-01T22:18:37Z",
_17
"url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Participants/MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"last_read_message_index": null,
_17
"last_read_timestamp": null
_17
}

Step 6: Send a group text message

step-6-send-a-group-text-message page anchor

Now that all of the Participants are in our Conversation, we'll send one more message, this time from the assistant to the rest of the group.

Send another message to the Conversation

send-another-message-to-the-conversation page anchor

This will be from the Assistant to everyone else in the group text.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_14
// Download the helper library from https://www.twilio.com/docs/node/install
_14
// Find your Account SID and Auth Token at twilio.com/console
_14
// and set the environment variables. See http://twil.io/secure
_14
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_14
const authToken = process.env.TWILIO_AUTH_TOKEN;
_14
const client = require('twilio')(accountSid, authToken);
_14
_14
client.conversations.v1.conversations('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_14
.messages
_14
.create({
_14
author: 'theAssistant',
_14
body: `I've just emailed you some documents. Could you please review them?`
_14
})
_14
.then(message => console.log(message.sid));

Output

_27
{
_27
"sid": "IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"conversation_sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"body": "I've just emailed you some documents. Could you please review them?",
_27
"media": null,
_27
"author": "theAssistant",
_27
"participant_sid": "MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"attributes": {},
_27
"date_created": "2020-07-01T22:18:37Z",
_27
"date_updated": "2020-07-01T22:18:37Z",
_27
"index": 0,
_27
"delivery": {
_27
"total": 2,
_27
"sent": "all",
_27
"delivered": "some",
_27
"read": "some",
_27
"failed": "none",
_27
"undelivered": "none"
_27
},
_27
"content_sid": null,
_27
"url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"links": {
_27
"delivery_receipts": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Receipts",
_27
"channel_metadata": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelMetadata"
_27
}
_27
}

At this point, you should have received a message from two separate Twilio phone numbers, each representing a Chat participant in the group text. It may look like a 1:1 Conversation, but when you send messages back and forth, you can see that all parties are uniquely identified.

  • Try sending an SMS back from your personal device as the advisee.
  • Send another message from the Financial Advisor using the REST API to see all three Participants in the Conversation.

Send one more Conversational Message

send-one-more-conversational-message page anchor

The gang's all here!

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_14
// Download the helper library from https://www.twilio.com/docs/node/install
_14
// Find your Account SID and Auth Token at twilio.com/console
_14
// and set the environment variables. See http://twil.io/secure
_14
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_14
const authToken = process.env.TWILIO_AUTH_TOKEN;
_14
const client = require('twilio')(accountSid, authToken);
_14
_14
client.conversations.v1.conversations('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_14
.messages
_14
.create({
_14
author: 'YourFinancialAdvisor',
_14
body: 'Excellent. We both look forward to working with you.'
_14
})
_14
.then(message => console.log(message.sid));

Output

_27
{
_27
"sid": "IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"conversation_sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"body": "Excellent. We both look forward to working with you.",
_27
"media": null,
_27
"author": "YourFinancialAdvisor",
_27
"participant_sid": "MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"attributes": {},
_27
"date_created": "2020-07-01T22:18:37Z",
_27
"date_updated": "2020-07-01T22:18:37Z",
_27
"index": 0,
_27
"delivery": {
_27
"total": 2,
_27
"sent": "all",
_27
"delivered": "some",
_27
"read": "some",
_27
"failed": "none",
_27
"undelivered": "none"
_27
},
_27
"content_sid": null,
_27
"url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"links": {
_27
"delivery_receipts": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Receipts",
_27
"channel_metadata": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelMetadata"
_27
}
_27
}

conversation_group_mms_finance.

Twilio Conversations' native support of group MMS allows you to create rich, multi-channel interactions with your users. In this guide, we walked through creating two different group texting scenarios with different ratios of SMS and Chat participants using the projected address.

Now that you can create group texting experiences for your customers, you can also take advantage of the other features in Twilio Conversations:


Rate this page: