Initializes an XChat media upload session.
curl --request POST \
--url https://api.x.com/2/chat/media/upload/initialize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conversation_id": "1603419216513746946:1603419216513746946",
"total_bytes": 1
}
'{
"data": {
"conversation_id": "1603419216513746946:1603419216513746946",
"media_hash_key": "rByqeHiVlD",
"session_id": "735401"
}
}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 request has succeeded.
Response from initializing a Chat media upload.
Show child attributes
curl --request POST \
--url https://api.x.com/2/chat/media/upload/initialize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conversation_id": "1603419216513746946:1603419216513746946",
"total_bytes": 1
}
'{
"data": {
"conversation_id": "1603419216513746946:1603419216513746946",
"media_hash_key": "rByqeHiVlD",
"session_id": "735401"
}
}