Users
Get DM conversation history
get/x/dm/{userId}/history
Path parameters
userIdstring required
Target user ID
Query parameters
accountstring required
X handle (without the @ prefix) of the connected X account used to read the conversation. The account must be a participant in the conversation.
cursorstring
Pagination cursor for DM history
maxIdstring
Legacy pagination cursor (backward compat)
Response
List of DM messages
Example response
{
"messages": [
{
"id": "1234567890123456789",
"text": "Hey, how are you?",
"senderId": "9876543210",
"receiverId": "1234567890"
}
],
"has_next_page": true,
"next_cursor": "DAACCgACGRElMJcAAA"
}