Skip to main content
GET
/
2
/
dm_conversations
/
media
/
{dm_id}
/
{media_id}
/
{resource_id}
Download DM Media
curl --request GET \
  --url https://api.x.com/2/dm_conversations/media/{dm_id}/{media_id}/{resource_id} \
  --header 'Authorization: Bearer <token>'
"<string>"

Authorizations

Authorization
string
header
required

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

Path Parameters

dm_id
string
required

The unique identifier of the Direct Message event containing the media. Unique identifier of a DM Event.

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

"1146654567674912769"

media_id
string
required

The unique identifier of the media attached to the Direct Message. The unique identifier of this Media.

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

"1146654567674912769"

resource_id
string
required

The resource identifier of the media file, including file extension (e.g. 'hVJQTwig.jpg'). The resource identifier of the media file, including file extension.

Pattern: ^[a-zA-Z0-9_.-]{1,50}$
Example:

"tJg5kUG5RKPi3jNi.jpg"

Response

The request has succeeded.

Raw binary data bytes.