get_dm_history
Fetch a user's direct message history, including message details and pagination cursors, to review private conversations or walk back through older messages with max_id.
Instructions
Get DM conversation history with a user.
Note: Retrieves PRIVATE messages. Do not bulk-call. X has aggressive anti-spam on DMs and may suspend the account.
Returns JSON with messages (id/text/sender_id/recipient_id/time),
next_cursor for pagination via max_id, and when present:
timeline_events (non-message entries such as trust_conversation)
and warnings (e.g. incomplete history for end-to-end encrypted /
X Chat conversations — legacy DM history does not return ciphertext
bodies after upgrade).
Args:
screen_name: Twitter username (without @).
max_id: If specified, retrieves messages older than this ID (for pagination).
Pass the value from a previous response's next_cursor here on the
next call to walk further back in time.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_id | No | ||
| screen_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |