DM Sohbet Geçmişini Getir (XChat v3)
DM Sohbet Geçmişini Getir (XChat v3).
API Belgelerine Dön
/DM Endpoints
POST
/v3/twitter/dm-historyAPI Yetkilendirmesi
AuthorizationBearer token · headerzorunluTwexAPI genel Bearer Token kimlik bilgisi. İstek başlığı: Authorization: Bearer <YOUR_TWEXAPI_KEY>.
İstek Gövdesi
zorunluapplication/jsonrecipientstringzorunluUser id, @handle, conversationId a:b, or group g....
pinstring | anyIdentity PIN (default 1234).
default: "1234"
Özellikleri gösterÖzellikleri gizle
Any of:
string
stringany
anycountinteger | anyMax events per page (10–200, default 50).
default: 50
Özellikleri gösterÖzellikleri gizle
Any of:
integer
integerany
anyallboolean | anyFollow has_more and return every page.
default: false
Özellikleri gösterÖzellikleri gizle
Any of:
boolean
booleanany
anybeforestring | anyOldest sequenceId for paging. Pass the previous page's oldest message sequence_id.
Özellikleri gösterÖzellikleri gizle
Any of:
string
stringany
anycookiestringzorunluKullanıcının kendi yetkilendirilmiş Twitter oturum kimlik bilgileri veya auth_token (BYOC — Bring Your Own Cookie). Sıfır kimlik bilgisi saklama ile durum bilgisi olmayan proxy yürütmesi. [Kimlik Doğrulama Güvenliği](/tr/authentication#write-operations--byoc-bring-your-own-cookie) ve [Cookie Nasıl Alınır](https://youtube-promotion.pages.dev/how-to-get-twitter-cookie) sayfasına bakın.
proxystring | anyOptional HTTP proxy. Example: http://username:password@ip:port
Özellikleri gösterÖzellikleri gizle
Any of:
string
stringany
anyYanıtlar
200Conversation messages with pagination info.
codeintegerzorunluHTTP durum kodu (200 başarılı anlamına gelir)
msgstringzorunluYanıt mesajı (örn: 'success')
dataDmHistoryV3Data | anyUç nokta tarafından döndürülen ana veri
Özellikleri gösterÖzellikleri gizle
Any of:
DmHistoryV3Data
conversation_idstringzorunluConversation id
has_morebooleanzorunluWhether older messages are available
messagesMessageModel[]zorunluList of message objects
Özellikleri gösterÖzellikleri gizle
Array of
MessageModelidstringzorunluMessage ID
textstringzorunluMesaj metni
timestringzorunluMessage time
attachmentobject | anyMessage attachment
Özellikleri gösterÖzellikleri gizle
Any of:
object
objectany
anyattachmentsobject[] | anyXChat media attachments (v3).
Özellikleri gösterÖzellikleri gizle
Any of:
object[]
Array of
objectobjectany
anysequence_idstring | anyXChat sequence id. Use the oldest message's sequence_id as before for pagination.
Özellikleri gösterÖzellikleri gizle
Any of:
string
stringany
anysender_idstring | anySender ID
Özellikleri gösterÖzellikleri gizle
Any of:
string
stringany
anyrecipient_idstring | anyDM alıcısının Twitter ID'si
Özellikleri gösterÖzellikleri gizle
Any of:
string
stringany
anyany
any422Parametre Doğrulama Hatası
detailValidationError[]Özellikleri gösterÖzellikleri gizle
Array of
ValidationErrorlocstring | integer[]zorunluÖzellikleri gösterÖzellikleri gizle
Array of
string | integerAny of:
string
stringinteger
integermsgstringzorunluYanıt mesajı (örn: 'success')
typestringzorunluinputanyctxobject⚡Etkileşimli KonsolPOST
⚡Etkileşimli Konsol / API TestiPOSTLive Console
🌐Hedef Sunucu:
https://api.twexapi.io● Canlı Ortam Hazır
✍️
Yazma İşlemi Kimlik Kılavuzu (TwexAPI Anahtarı + Twitter Çerezi)
1. TwexAPI Anahtarı (Bearer Token): İstek faturalandırması ve kimlik doğrulama için aşağıdaki "API Yetkilendirmesi"ne girin.
2. Twitter Hesabı Çerezi: Yazma işlemleri için (tweet, beğeni, takip), aşağıdaki cookie alanına hedef hesabın Çerezini (örn. auth_token=...; ct0=...) girin.
🔑API Yetkilendirmesi
📝İstek Gövdesiapplication/json
📡
暂无响应数据
请在「请求配置」中确认参数后,点击底部的「发送请求」按钮。
İstek
curl -X POST "https://api.twexapi.io/v3/twitter/dm-history" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"recipient": "1928096185664843776:1989842918455291904",
"pin": "1234",
"count": 50,
"all": false,
"before": "2076684837654876160",
"cookie": "ct0=abc123... or 2c4a4e1832096aa694c739b83c83b6d96d43eba7",
"proxy": "http://username:password@ip:port"
}'const response = await fetch("https://api.twexapi.io/v3/twitter/dm-history", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"recipient": "1928096185664843776:1989842918455291904",
"pin": "1234",
"count": 50,
"all": false,
"before": "2076684837654876160",
"cookie": "ct0=abc123... or 2c4a4e1832096aa694c739b83c83b6d96d43eba7",
"proxy": "http://username:password@ip:port"
})
});import requests
response = requests.post(
"https://api.twexapi.io/v3/twitter/dm-history",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"recipient": "1928096185664843776:1989842918455291904",
"pin": "1234",
"count": 50,
"all": False,
"before": "2076684837654876160",
"cookie": "ct0=abc123... or 2c4a4e1832096aa694c739b83c83b6d96d43eba7",
"proxy": "http://username:password@ip:port"
},
)Yanıt
{
"code": 200,
"msg": "success",
"data": {
"conversation_id": "1928096185664843776:1989842918455291904",
"has_more": true,
"messages": [
{
"id": "1234567890123456789",
"text": "Hello, how are you?",
"time": "2024-01-01T12:00:00Z",
"attachment": {
"type": "image",
"url": "https://example.com/image.jpg"
},
"attachments": [
{
"attachment_id": "cda5ccdd-af53-48a3-bdd1-5039a73aea25",
"conversation_id": "1928096185664843776:1989842918455291904",
"filename": "image.jpg",
"filesize_bytes": 421299,
"height": 1448,
"key_version": "3",
"media_hash_key": "blRIlZCVIO",
"type": "image",
"type_name": "IMAGE",
"width": 1086
}
],
"sequence_id": "2076661179334979585",
"sender_id": "1234567890123456789",
"recipient_id": "1234567890123456789"
}
]
}
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}