curl --request POST \
--url https://api.omnixapi.com/api/v1/twitter/dm/conversation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"auth_token": "YOUR_X_AUTH_TOKEN",
"encryption_code": "YOUR_XCHAT_PIN",
"conversation_id": "1000000000000000001:3000000000000000003",
"cursor": "<string>",
"count": 50,
"proxy": "http://user:pass@host:8080"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
auth_token: 'YOUR_X_AUTH_TOKEN',
encryption_code: 'YOUR_XCHAT_PIN',
conversation_id: '1000000000000000001:3000000000000000003',
cursor: '<string>',
count: 50,
proxy: 'http://user:pass@host:8080'
})
};
fetch('https://api.omnixapi.com/api/v1/twitter/dm/conversation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.omnixapi.com/api/v1/twitter/dm/conversation"
payload = {
"auth_token": "YOUR_X_AUTH_TOKEN",
"encryption_code": "YOUR_XCHAT_PIN",
"conversation_id": "1000000000000000001:3000000000000000003",
"cursor": "<string>",
"count": 50,
"proxy": "http://user:pass@host:8080"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": true,
"data": {
"conversation_id": "<string>",
"message_count": 123,
"has_more": true,
"next_cursor": "<string>",
"messages": [
{
"id": "<string>",
"seq_id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"sender_id": "<string>",
"from_me": true,
"text": "<string>",
"edited": true,
"reactions": [
{
"emoji": "👍",
"sender_id": "<string>",
"from_me": true
}
]
}
]
},
"error": null
}{
"status": false,
"data": null,
"error": "Missing required field: text"
}{
"status": false,
"data": null,
"error": "Missing required field: text"
}Read Conversation
The full message history of one conversation, oldest to newest. Edited messages show their latest text with edited: true, and reactions are attached to the message they apply to. Requires your encryption_code (your XChat PIN — the code you set when enabling encrypted chats on X). To load older messages, pass cursor (a seq_id from the previous response’s next_cursor).
curl --request POST \
--url https://api.omnixapi.com/api/v1/twitter/dm/conversation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"auth_token": "YOUR_X_AUTH_TOKEN",
"encryption_code": "YOUR_XCHAT_PIN",
"conversation_id": "1000000000000000001:3000000000000000003",
"cursor": "<string>",
"count": 50,
"proxy": "http://user:pass@host:8080"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
auth_token: 'YOUR_X_AUTH_TOKEN',
encryption_code: 'YOUR_XCHAT_PIN',
conversation_id: '1000000000000000001:3000000000000000003',
cursor: '<string>',
count: 50,
proxy: 'http://user:pass@host:8080'
})
};
fetch('https://api.omnixapi.com/api/v1/twitter/dm/conversation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.omnixapi.com/api/v1/twitter/dm/conversation"
payload = {
"auth_token": "YOUR_X_AUTH_TOKEN",
"encryption_code": "YOUR_XCHAT_PIN",
"conversation_id": "1000000000000000001:3000000000000000003",
"cursor": "<string>",
"count": 50,
"proxy": "http://user:pass@host:8080"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": true,
"data": {
"conversation_id": "<string>",
"message_count": 123,
"has_more": true,
"next_cursor": "<string>",
"messages": [
{
"id": "<string>",
"seq_id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"sender_id": "<string>",
"from_me": true,
"text": "<string>",
"edited": true,
"reactions": [
{
"emoji": "👍",
"sender_id": "<string>",
"from_me": true
}
]
}
]
},
"error": null
}{
"status": false,
"data": null,
"error": "Missing required field: text"
}{
"status": false,
"data": null,
"error": "Missing required field: text"
}Authorizations
Your OmniX API key, e.g. omnix_live_.... Billed per call.
Body
The X account auth_token cookie the action runs as.
"YOUR_X_AUTH_TOKEN"
Your XChat encryption code — the PIN you set when enabling encrypted chats on X. Used to recover your key so messages can be decrypted and outgoing events signed.
"YOUR_XCHAT_PIN"
The conversation id from the inbox.
"1000000000000000001:3000000000000000003"
A seq_id (from a previous next_cursor) to page to older messages.
Messages per page (default 50, max 200).
Optional outbound proxy for this call (http:// or https://, optionally user:pass@host:port). The X request runs through it — useful for geo-routing or spreading calls across IPs. SOCKS proxies are not supported.
"http://user:pass@host:8080"