Skip to main content
GET
/
2
/
chat
/
conversations
/
{conversation_id}
Get Chat Conversation
curl --request GET \
  --url https://api.x.com/2/chat/conversations/{conversation_id} \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "encoded_event": "<string>",
      "conversation_id": "<string>",
      "conversation_token": "<string>",
      "created_at_msec": "<string>",
      "id": "<string>",
      "is_trusted": true,
      "message_event_signature": {
        "message_signing_key_info_list": [
          {
            "member_id": "<string>",
            "public_key_version": "<string>",
            "signing_public_key": "<string>"
          }
        ],
        "public_key_version": "<string>",
        "signature": "<string>",
        "signature_version": "<string>",
        "signing_public_key": "<string>"
      },
      "previous_sequence_id": "<string>",
      "sender_id": "<string>",
      "sequence_id": "<string>"
    }
  ],
  "errors": [
    {
      "title": "<string>",
      "type": "<string>",
      "detail": "<string>",
      "status": 123
    }
  ],
  "meta": {
    "has_more": true,
    "missing_conversation_key_change_events": [
      "<string>"
    ],
    "next_token": "<string>",
    "result_count": 123
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

conversation_id
string
required

The Chat conversation ID. Unique identifier of an Chat conversation. Format is either two user IDs separated by a hyphen (e.g., '1215441834412953600-1603419180975409153') for direct conversations, or 'g' followed by a numeric ID (e.g., 'g1234567890123456789') for group conversations.

Example:

"1215441834412953600-1603419180975409153"

Query Parameters

max_results
integer<int32>
default:10

Maximum number of message events to return.

Required range: 1 <= x <= 100
pagination_token
string

Token for pagination to retrieve the next page of results.

chat_message_event.fields
enum<string>[]

A comma separated list of ChatMessageEvent fields to display. The fields available for a ChatMessageEvent object.

Minimum array length: 1
Available options:
conversation_id,
conversation_token,
created_at_msec,
encoded_event,
id,
is_trusted,
message_event_signature,
previous_id,
sender_id
Example:
[
"conversation_id",
"conversation_token",
"created_at_msec",
"encoded_event",
"id",
"is_trusted",
"message_event_signature",
"previous_id",
"sender_id"
]

Response

The request has succeeded.

data
object[]

List of message events in the conversation.

errors
object[]
Minimum array length: 1
meta
object