twitter_dm_send
Send a direct message to a user by providing their numeric ID and message text, requiring authenticated session and residential proxy for reliable delivery. Returns message ID and conversation ID.
Instructions
Send a Direct Message AS your authenticated account. Provide the recipient's numeric user id (recipient_id, resolve a @handle with twitter_user_info first) and the message text. Requires an authenticated session with write capability behind your key; X soft-blocks writes from datacenter IPs, so route through a residential proxy_url for reliability. Returns message_id and conversation_id. Delivers a real DM and is not silently reversible.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ct0 | No | Optional. The account's ct0 cookie, paired with auth_token. Sent as the x-ct0 header. | |
| text | Yes | The Direct Message body text to send (non-empty). | |
| proxy_url | No | Optional. Residential proxy URL to egress this call through. Recommended for writes: X soft-blocks writes from datacenter IPs as automated. Sent as the x-proxy-url header. | |
| auth_token | No | Optional. The account's auth_token cookie, to act AS that account for this call (must be paired with ct0). Sent as the x-auth-token header; never placed in the URL. | |
| user_agent | No | Optional. User-Agent string to send for this session. Sent as the x-user-agent header. | |
| recipient_id | Yes | Numeric Twitter/X user id of the recipient (e.g. '44196397'). Resolve a @handle to its id with twitter_user_info first. The recipient must allow DMs from you. |