Skip to main content
GET
/
2
/
chat
/
media
/
{conversation_id}
/
{media_hash_key}
Download Chat Media
curl --request GET \
  --url https://api.x.com/2/chat/media/{conversation_id}/{media_hash_key} \
  --header 'Authorization: Bearer <token>'
"<string>"

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.

Pattern: ^([0-9]{1,19}-[0-9]{1,19}|g[0-9]{1,19})$
Example:

"1215441834412953600-1603419180975409153"

media_hash_key
string
required

The media hash key returned from the upload initialize step. The media hash key returned from the upload initialize step. Alphanumeric characters only.

Pattern: ^[a-zA-Z0-9]{1,50}$
Example:

"AGgkIbPRTG"

Response

The request has succeeded.

Raw binary data bytes.