Aller au contenu
Twexapi
Français
Esc
naviguerouvrir⌘Japerçu

Obtenir la conversation Grok

Obtenir la conversation Grok.

POST/v3/twitter/grok/conversation
Autorisation API
AuthorizationBearer token · headerrequis
Jeton Bearer global pour TwexAPI. Inclus sous la forme : Authorization: Bearer <YOUR_TWEXAPI_KEY>.
Corps de la requête
requisapplication/json
conversation_idstringrequis
Grok conversation rest id.
cookiestringrequis
Identifiants de session ou auth_token autorisés de l'utilisateur (BYOC — Bring Your Own Cookie). Exécution proxy sans état avec zéro rétention d'identifiants. Consultez [Sécurité et Authentification](/fr/authentication#write-operations--byoc-bring-your-own-cookie) et [Comment obtenir un Cookie](https://youtube-promotion.pages.dev/how-to-get-twitter-cookie).
proxystring | any
Optional HTTP proxy. Example: http://username:password@ip:port
Afficher les propriétés
Any of:
string
string
any
any
Réponses
200Grok conversation messages.
codeintegerrequis
Code d'état HTTP (200 indique le succès)
msgstringrequis
Message de réponse (ex. 'success')
dataGrokConversationData | any
Données principales renvoyées par l'API
Afficher les propriétés
Any of:
GrokConversationData
conversation_idstringrequis
Grok conversation rest id
is_pinnedboolean
Whether the conversation is pinned
default: false
cursorstring | any
Curseur de pagination
Afficher les propriétés
Any of:
string
string
any
any
itemsGrokConversationItem[]
Conversation items
Afficher les propriétés
Array of GrokConversationItem
chat_item_idstringrequis
Chat item id
messagestring | any
Message content
Afficher les propriétés
Any of:
string
string
any
any
sender_typestring | any
Sender type: User or Agent
Afficher les propriétés
Any of:
string
string
any
any
created_at_msinteger | any
Created at timestamp in ms
Afficher les propriétés
Any of:
integer
integer
any
any
grok_modestring | any
Grok mode
Afficher les propriétés
Any of:
string
string
any
any
thinking_tracestring | any
Thinking trace text
Afficher les propriétés
Any of:
string
string
any
any
image_urlsstring[]
Generated image urls from card attachments
any
any
422Erreur de validation des paramètres
detailValidationError[]
Afficher les propriétés
Array of ValidationError
locstring | integer[]requis
Afficher les propriétés
Array of string | integer
Any of:
string
string
integer
integer
msgstringrequis
Message de réponse (ex. 'success')
typestringrequis
inputany
ctxobject
Console interactivePOST
Console interactive / Tester l'APIPOST
Live Console
🌐Serveur cible :https://api.twexapi.io
● Prêt pour la production
✍️
Guide d'identification d'écriture (Clé TwexAPI + Cookie Twitter)

1. Clé TwexAPI (Bearer Token) : À renseigner sous "Autorisation API" ci-dessous pour la facturation et l'authentification.

2. Cookie Twitter : Pour les opérations d'écriture (tweet, like, etc.), renseignez le Cookie Twitter (ex : auth_token=...; ct0=...) dans le champ cookie ci-dessous.

🔑Autorisation API
📝Corps de la requêteapplication/json
📡
暂无响应数据

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

Requête
curl -X POST "https://api.twexapi.io/v3/twitter/grok/conversation" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "conversation_id": "2063972906435248338",
  "cookie": "ct0=abc123... or 2c4a4e1832096aa694c739b83c83b6d96d43eba7",
  "proxy": "http://username:password@ip:port"
}'
Réponse
{
  "code": 200,
  "msg": "success",
  "data": {
    "conversation_id": "string",
    "is_pinned": false,
    "cursor": "string",
    "items": [
      {
        "chat_item_id": "2063977852924837888",
        "message": "string",
        "sender_type": "User",
        "created_at_ms": 0,
        "grok_mode": "Normal",
        "thinking_trace": "string",
        "image_urls": [
          "string"
        ]
      }
    ]
  }
}