---
title: "Get DM Media (XChat v3)"
method: POST
path: "/v3/twitter/dm-media"
tags: ["DM Endpoints"]
---

# Get DM Media (XChat v3)

`POST /v3/twitter/dm-media`

## Request

- Base URL: `https://api.twexapi.io`
- URL: `https://api.twexapi.io/v3/twitter/dm-media`
- Auth: HTTP bearer

Fetch one XChat media attachment and return a playable URL. Use conversation_id, media_hash_key, and optional key_version from /v3/twitter/dm-history attachments.

## Request body

- GetDmMediaV3Query: Fetch one XChat media attachment and return a playable URL.
  - `conversation_id` string, required: Conversation id from /v3/twitter/dm-history
  - `media_hash_key` string, required: Attachment media_hash_key from dm-history
  - `key_version` string, nullable: Optional message key_version from dm-history (recommended).
  - `type_name` string, nullable: Optional IMAGE/VIDEO/GIF hint
  - `filename` string, nullable: Optional filename hint
  - `pin` string, nullable: Identity PIN (default 1234).
  - `cookie` string, required: The user's own authorized Twitter session credentials or auth_token (BYOC — Bring Your Own Cookie). Stateless proxy execution with zero credential retention. See [Authentication Security](/authentication#write-operations--byoc-bring-your-own-cookie) and [How to get Cookie](https://youtube-promotion.pages.dev/how-to-get-twitter-cookie).
  - `proxy` string, nullable: Optional HTTP proxy. Example: http://username:password@ip:port

## Response `200`

Playable media URL and metadata.

- GetDmMediaV3Response
  - `code` integer, required: Response code
  - `msg` string, required: Response message
  - `data` GetDmMediaV3Data
    - `url` string, required: Playable media URL
    - `path` string, required: Media path on this API
    - `content_type` string, required: MIME type
    - `filename` string, nullable: Suggested filename
    - `byte_length` integer, required: File size in bytes
    - `cached` boolean, required: Whether the media was already available

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/twexapi/apis/twexapi-rest-api.md) · [All operations](https://skmtc.dev/twexapi/apis/twexapi-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/twexapi/apis/twexapi-rest-api/revisions/59a99ac0d8f7?raw)
