Participant Conversation Resource
The ParticipantConversation resource lists all the Conversations for a specific participant. It performs the lookup using an exact match to the participant identifier.
This resource supports the lookup of conversations for a specific participant based on two types of query parameters:
- Identity: for Chat users,
- Address: for non-Chat members, e.g., SMS or WhatsApp addresses.
Users can provide only one parameter at a time, i.e. either identity
or address
. The returned data will be sorted by the conversationSid
alphabetically.
ParticipantConversation properties
Each Participant Conversation resource contains these properties.
Resource Properties in REST API format | |
---|---|
account_sid
|
The unique ID of the Account responsible for this conversation. |
chat_service_sid
|
The unique ID of the Conversation Service this conversation belongs to. |
participant_sid
|
The unique ID of the Participant. |
participant_user_sid
|
The unique string that identifies the conversation participant as Conversation User. |
participant_identity
|
A unique string identifier for the conversation participant as Conversation User. This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters. |
participant_messaging_binding
|
Information about how this participant exchanges messages with the conversation. A JSON parameter consisting of type and address fields of the participant. |
conversation_sid
|
The unique ID of the Conversation this Participant belongs to. |
conversation_unique_name
|
An application-defined string that uniquely identifies the Conversation resource. |
conversation_friendly_name
|
The human-readable name of this conversation, limited to 256 characters. Optional. |
conversation_attributes
|
An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. Note that if the attributes are not set "{}" will be returned. |
conversation_date_created
|
The date that this conversation was created, given in ISO 8601 format. |
conversation_date_updated
|
The date that this conversation was last updated, given in ISO 8601 format. |
conversation_created_by
|
Identity of the creator of this Conversation. |
conversation_state
|
The current state of this User Conversation. One of |
conversation_timers
|
Timer date values representing state update for this conversation. |
links
|
Contains absolute URLs to access the participant and conversation of this conversation. |
List All of a Participant's Conversations
https://conversations.twilio.com/v1/ParticipantConversations
The ParticipantConversation resource also supports pagination via additional parameters like: PageSize
and PageToken
.
It's expected that you will encode the url for the ParticipantConversations endpoint, for example, if a phone number is passed as an address parameter the +
character should be encoded as %2B
.
In the Group MMS use case, it may happen that the participant might not have an identifier (no address
and no identity
). So, this endpoint will not return conversations for this participant. Similarly if the identity of this participant with Projected Address is created later then this endpoint will not return conversations to which this participant was added when it was without identity.
Parameters
Parameters in REST API format | |
---|---|
identity
Optional
|
A unique string identifier for the conversation participant as Conversation User. This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters. |
address
Optional
|
A unique string identifier for the conversation participant who's not a Conversation User. This parameter could be found in messaging_binding.address field of Participant resource. It should be url-encoded. |
Example 1
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 Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.