Skip to main content
GET
/
2
/
media
미디어 키로 미디어 조회
curl --request GET \
  --url https://api.x.com/2/media \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "type": "<string>",
      "preview_image_url": "<string>",
      "variants": [
        {
          "bit_rate": 123,
          "content_type": "<string>",
          "url": "<string>"
        }
      ],
      "height": 1,
      "media_key": "<string>",
      "width": 1
    }
  ],
  "errors": [
    {
      "title": "<string>",
      "type": "<string>",
      "detail": "<string>",
      "status": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Query Parameters

media_keys
string[]
required

media key의 쉼표로 구분된 목록입니다. 요청당 최대 100개까지 지정할 수 있습니다.

Required array length: 1 - 100 elements

이 첨부 파일에 대한 Media Key 식별자입니다.

Pattern: ^([0-9]+)_([0-9]+)$
media.fields
enum<string>[]

요청에 포함할 Media 필드의 쉼표로 구분된 목록입니다. Media 객체에서 지정할 수 있는 필드입니다.

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
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

요청이 성공했습니다.

data
object[]
Minimum array length: 1
errors
object[]
Minimum array length: 1

IETF RFC 7807(https://tools.ietf.org/html/rfc7807)에 정의된 HTTP Problem Details 객체