Skip to main content
GET
Get Media by media key

Authorizations

Authorization
string
header
required

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

FlowAuthorization Code
Authorization URL
https://api.x.com/2/oauth2/authorize
Token URL
https://api.x.com/2/oauth2/token
Scopes1
tweet.read
View all posts you can see, including those from protected accounts.

Path Parameters

media_key
string
required
Pattern: ^([0-9]+)_([0-9]+)$

Query Parameters

media.fields
enum<string>[]

A comma separated list of Media fields to display. The fields available for a Media object.

Minimum array length: 1
Available options:
alt_text,
duration_ms,
height,
media_key,
non_public_metrics,
organic_metrics,
preview_image_url,
promoted_metrics,
public_metrics,
type,
url,
variants,
width

Response

The request has succeeded.

data
object
errors
object[]