GET
/
2
/
media
/
{media_key}
Get Media by media key
curl --request GET \
  --url https://api.x.com/2/media/{media_key} \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "height": 1,
    "media_key": "<string>",
    "type": "<string>",
    "width": 1
  },
  "errors": [
    {
      "detail": "<string>",
      "status": 123,
      "title": "<string>",
      "type": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

media_key
string
required

A single Media Key.

Query Parameters

media.fields
enum<string>[]

A comma separated list of Media fields to display.

Minimum length: 1
Example:
[
"alt_text",
"duration_ms",
"height",
"media_key",
"non_public_metrics",
"organic_metrics",
"preview_image_url",
"promoted_metrics",
"public_metrics",
"type",
"url",
"variants",
"width"
]

Response

200
application/json

The request has succeeded.

The response is of type object.