DM Endpoints

Get DM Media (XChat v3)

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.

post/v3/twitter/dm-media

Request

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

Request body

conversation_idstring required

Conversation id from /v3/twitter/dm-history

media_hash_keystring required

Attachment media_hash_key from dm-history

key_versionstring nullable

Optional message key_version from dm-history (recommended).

type_namestring nullable

Optional IMAGE/VIDEO/GIF hint

filenamestring nullable

Optional filename hint

pinstring nullable

Identity PIN (default 1234).

cookiestring 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 and How to get Cookie.

proxystring nullable

Optional HTTP proxy. Example: http://username:password@ip:port

Example request

{
  "conversation_id": "1928096185664843776:1989842918455291904",
  "media_hash_key": "blRIlZCVIO",
  "key_version": "3",
  "type_name": "VIDEO",
  "filename": "clip.mp4",
  "pin": "1234",
  "cookie": "ct0=abc123... or 2c4a4e1832096aa694c739b83c83b6d96d43eba7",
  "proxy": "http://username:password@ip:port"
}

Response

Playable media URL and metadata.

codeinteger required

Response code

msgstring required

Response message

Example response

{
  "code": 200,
  "msg": "success",
  "data": {
    "content_type": "video/mp4"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.