Question
How do I distinguish between an incoming 1-on-1 direct message and a group MMS message in standard mobile messaging apps using Twilio Conversations (classic)? When end users reply from their native messaging client, how does Twilio determine whether the inbound message belongs to an ongoing group thread or a direct conversation?
Product
Twilio Conversations Classic
Environment
Twilio Console
Answer
In Twilio Conversations (classic), inbound message segregation is not determined by inspecting the inbound message payload directly. Instead, message routing and distinction depend entirely on the Participant configuration and address bindings established inside the Conversation resource.
Twilio routes conversations based on how participant addresses are bound:
-
1-on-1 Messaging (
proxyAddress): When adding a non-chat participant using amessagingBinding.addresspaired with amessagingBinding.proxyAddress, Twilio establishes a direct bidirectional channel. Messages sent through this configuration appear on the handset as standard 1-on-1 SMS or MMS messages. -
Group MMS (
projectedAddress): When adding non-chat participants using onlymessagingBinding.addressor chat participants using onlymessagingBinding.projectedAddressor chat participants using identity paired with amessagingBinding.projectedAddress, Twilio elevates the session to a native Group MMS thread. In this setup, every participant receives incoming and outgoing messages in a unified thread showing the sender's projected phone number.
To differentiate between a group reply and a direct 1-on-1 reply within your webhook handler (such as onMessageAdded or post-event webhooks):
-
Extract the Conversation SID: Retrieve the
ConversationSidfrom the incoming webhook payload. - Fetch the Conversation Resource: Query the Conversation and retrieve its participant list.
-
Inspect the Participant Bindings:
-
Group Message: If the conversation's non chat participants are configured using only
messagingBinding.addressor chat participants using onlymessagingBinding.projectedAddressor chat participants using identity paired with amessagingBinding.projectedAddress, the incoming response is part of a Group MMS thread. -
1-on-1 Message: If the conversation contains non chat participants bound using a
proxyAddress, the incoming response is a direct 1-on-1 interaction.
-
Group Message: If the conversation's non chat participants are configured using only
Additionally, keep the following configuration requirements in mind when working with group messaging:
- 10DLC Registration: Every Twilio phone number used to send A2P SMS or MMS to US recipients must be registered under an approved A2P 10DLC campaign, even when used exclusively for group texting.
- Session Lifetime: A conversation remains active indefinitely by default. It will not close or expire automatically unless you explicitly configure inactive/closed timers or update its state via the REST API.
-
Adding Multiple Recipients: Do not send comma-separated recipient numbers in a single API call, as this triggers
Error 21211: The 'To' number is not a valid phone number. Instead, add each participant individually using the Conversation Participant resource or add multiple participants simultaneously using the Conversation with Participants resource.