Create a Tweet Thread
Create a tweet thread from an ordered list of texts, $0.0005 per call.
Retour à la référence API
/Tweet Actions Endpoints
POST
/v3/twitter/tweets/create-threadAutorisation API
AuthorizationBearer token · headerrequisJeton Bearer global pour TwexAPI. Inclus sous la forme : Authorization: Bearer <YOUR_TWEXAPI_KEY>.
Corps de la requête
requisapplication/jsonitemsstring[]requisJSON array of tweet texts, e.g. ["1/ hello","2/ world"].
min items 1
cookiestringrequisIdentifiants 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 | anyOptional HTTP proxy. Example: http://username:password@ip:port
Afficher les propriétésMasquer les propriétés
Any of:
string
stringany
anyRéponses
200Created tweet ids in thread order.
codeintegerrequisCode d'état HTTP (200 indique le succès)
msgstringrequisMessage de réponse (ex. 'success')
dataCreateThreadData | anyDonnées principales renvoyées par l'API
Afficher les propriétésMasquer les propriétés
Any of:
CreateThreadData
tweetsCreateThreadTweetItem[]requisCreated tweets in thread order
Afficher les propriétésMasquer les propriétés
Array of
CreateThreadTweetItemidstringrequisCreated tweet ID
any
any422Erreur de validation des paramètres
detailValidationError[]Afficher les propriétésMasquer les propriétés
Array of
ValidationErrorlocstring | integer[]requisAfficher les propriétésMasquer les propriétés
Array of
string | integerAny of:
string
stringinteger
integermsgstringrequisMessage de réponse (ex. 'success')
typestringrequisinputanyctxobject⚡Console interactivePOST
⚡Console interactive / Tester l'APIPOSTLive 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
💡Le corps JSON contient un champ
"cookie" pour authentifier votre compte Twitter.📡
暂无响应数据
请在「请求配置」中确认参数后,点击底部的「发送请求」按钮。
Requête
curl -X POST "https://api.twexapi.io/v3/twitter/tweets/create-thread" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"items": [
"1/ hello",
"2/ world"
],
"cookie": "ct0=abc123... or 2c4a4e1832096aa694c739b83c83b6d96d43eba7",
"proxy": "http://username:password@ip:port"
}'const response = await fetch("https://api.twexapi.io/v3/twitter/tweets/create-thread", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"items": [
"1/ hello",
"2/ world"
],
"cookie": "ct0=abc123... or 2c4a4e1832096aa694c739b83c83b6d96d43eba7",
"proxy": "http://username:password@ip:port"
})
});import requests
response = requests.post(
"https://api.twexapi.io/v3/twitter/tweets/create-thread",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"items": [
"1/ hello",
"2/ world"
],
"cookie": "ct0=abc123... or 2c4a4e1832096aa694c739b83c83b6d96d43eba7",
"proxy": "http://username:password@ip:port"
},
)Réponse
{
"code": 200,
"msg": "success",
"data": {
"tweets": [
{
"id": "1234567890123456789"
}
]
}
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}