Downloads encrypted media bytes from an XChat conversation. The response body contains raw binary bytes. For 1:1 conversations, provide the recipient’s user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.
curl --request GET \
--url https://api.x.com/2/chat/media/{id}/{media_hash_key} \
--header 'Authorization: Bearer <token>'"<string>"Documentation Index
Fetch the complete documentation index at: https://docs.x.com/llms.txt
Use this file to discover all available pages before exploring further.
The access token received from the authorization server in the OAuth 2.0 flow.
The recipient's user ID for a 1:1 conversation, or a group conversation ID (prefixed with 'g'). Identifies the conversation target. Accepts three formats: (1) a recipient user ID for 1:1 conversations (e.g., '1215441834412953600'), (2) a legacy 1:1 conversation ID with two user IDs separated by a dash (e.g., '1215441834412953600-1603419180975409153'), or (3) a group conversation ID prefixed with 'g' (e.g., 'g1234567890123456789'). The server constructs the canonical conversation ID from the authenticated user and recipient when a single user ID is provided.
^([0-9]{1,19}|[0-9]{1,19}-[0-9]{1,19}|g[0-9]{1,19})$"1215441834412953600"
The media hash key returned from the upload initialize step. The media hash key returned from the upload initialize step. Alphanumeric characters only.
^[a-zA-Z0-9]{1,50}$"AGgkIbPRTG"
The request has succeeded.
Raw binary data bytes.
curl --request GET \
--url https://api.x.com/2/chat/media/{id}/{media_hash_key} \
--header 'Authorization: Bearer <token>'"<string>"