본문으로 건너뛰기
Twexapi
한국어
Esc
이동열기⌘J미리보기

DM 대화 내역 조회 (XChat v3)

DM 대화 내역 조회 (XChat v3).

POST/v3/twitter/dm-history
API 인증
AuthorizationBearer token · header필수
TwexAPI 전역 인증 토큰 (Bearer Token). 헤더에 포함되어야 합니다: Authorization: Bearer <YOUR_TWEXAPI_KEY>.
요청 본문
필수application/json
recipientstring필수
User id, @handle, conversationId a:b, or group g....
pinstring | any
Identity PIN (default 1234).
default: "1234"
속성 표시
Any of:
string
string
any
any
countinteger | any
Max events per page (10–200, default 50).
default: 50
속성 표시
Any of:
integer
integer
any
any
allboolean | any
Follow has_more and return every page.
default: false
속성 표시
Any of:
boolean
boolean
any
any
beforestring | any
Oldest sequenceId for paging. Pass the previous page's oldest message sequence_id.
속성 표시
Any of:
string
string
any
any
cookiestring필수
사용자가 직접 승인한 Twitter 세션 자격 증명 또는 auth_token (BYOC — Bring Your Own Cookie). 자격 증명은 저장되지 않으며 무상태 프록시로만 실행됩니다. 자세한 내용은 [인증 및 보안 안내](/ko/authentication#write-operations--byoc-bring-your-own-cookie) 및 [쿠키 확인 방법](https://youtube-promotion.pages.dev/how-to-get-twitter-cookie)을 참조하세요.
proxystring | any
Optional HTTP proxy. Example: http://username:password@ip:port
속성 표시
Any of:
string
string
any
any
응답
200Conversation messages with pagination info.
codeinteger필수
HTTP 상태 코드 (200은 성공)
msgstring필수
응답 메시지 (예: 'success')
dataDmHistoryV3Data | any
엔드포인트가 반환한 핵심 데이터
속성 표시
Any of:
DmHistoryV3Data
conversation_idstring필수
Conversation id
has_moreboolean필수
Whether older messages are available
messagesMessageModel[]필수
List of message objects
속성 표시
Array of MessageModel
idstring필수
Message ID
textstring필수
메시지 본문
timestring필수
Message time
attachmentobject | any
Message attachment
속성 표시
Any of:
object
object
any
any
attachmentsobject[] | any
XChat media attachments (v3).
속성 표시
Any of:
object[]
Array of object
object
any
any
sequence_idstring | any
XChat sequence id. Use the oldest message's sequence_id as before for pagination.
속성 표시
Any of:
string
string
any
any
sender_idstring | any
Sender ID
속성 표시
Any of:
string
string
any
any
recipient_idstring | any
쪽지 수신자 사용자 ID
속성 표시
Any of:
string
string
any
any
any
any
422요청 매개변수 유효성 검사 오류
detailValidationError[]
속성 표시
Array of ValidationError
locstring | integer[]필수
속성 표시
Array of string | integer
Any of:
string
string
integer
integer
msgstring필수
응답 메시지 (예: 'success')
typestring필수
inputany
ctxobject
대화형 콘솔POST
대화형 콘솔 / API 테스트POST
Live Console
🌐대상 서버:https://api.twexapi.io
● 프로덕션 준비 완료
✍️
쓰기 작업 인증 정보 가이드 (TwexAPI 키 + Twitter 쿠키)

1. TwexAPI 플랫폼 키 (Bearer Token): 요청 과금 및 인증을 위해 아래 "API 인증"에 입력하세요.

2. Twitter 계정 쿠키: 트윗, 좋아요, 팔로우 등 쓰기 작업을 위해 아래 요청 본문의 cookie 필드에 쿠키(예: auth_token=...; ct0=...)를 입력하세요.

🔑API 인증
📝요청 본문application/json
📡
暂无响应数据

请在「请求配置」中确认参数后,点击底部的「发送请求」按钮。

요청 예시
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"
}'
응답 예시
{
  "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"
      }
    ]
  }
}