Passer au contenu principal
POST
/
2
/
media
/
upload
/
{id}
/
finalize
Finaliser le téléversement d’un média
curl --request POST \
  --url https://api.x.com/2/media/upload/{id}/finalize \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "id": "1146654567674912769",
    "media_key": "<string>",
    "expires_after_secs": 123,
    "processing_info": {
      "check_after_secs": 123,
      "progress_percent": 123
    },
    "size": 123
  },
  "errors": [
    {
      "title": "<string>",
      "type": "<string>",
      "detail": "<string>",
      "status": 123
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://generaltranslation.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Autorisations

Authorization
string
header
requis

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

Paramètres de chemin

id
string
requis

L’id du média à finaliser. L’identifiant unique de ce média.

Pattern: ^[0-9]{1,19}$
Exemple:

"1146654567674912769"

Réponse

La requête a réussi.

Réponse renvoyée lors de la récupération du statut d’une requête de téléversement de média.

data
object
errors
object[]
Minimum array length: 1

Un objet HTTP Problem Details, tel que défini dans la RFC IETF 7807 (https://tools.ietf.org/html/rfc7807).