Get cookie by auth token
Retrieve Twitter authentication cookie using the provided auth token. This endpoint converts an auth token into a usable cookie for Twitter API requests.
Back to API Reference
/Cookie Endpoints
GET
/twitter/{auth_token}/cookieAuthorization
AuthorizationBearer token · headerrequiredGlobal API Bearer Token for TwexAPI. Included as: Authorization: Bearer <YOUR_TWEXAPI_KEY>.
Path Parameters
auth_tokenstringrequiredResponses
200Twitter authentication cookie
codeintegerrequiredHTTP status code
msgstringrequiredResponse message
dataanyResponse data
Show propertiesHide properties
Any of:
any
anyany
any422Validation Error
detailValidationError[]Show propertiesHide properties
Array of
ValidationErrorlocstring | integer[]requiredShow propertiesHide properties
Array of
string | integerAny of:
string
stringinteger
integermsgstringrequiredtypestringrequiredinputanyctxobject⚡Interactive ConsoleGET
⚡Interactive Console / Try APIGETLive Console
🌐Target Server:
https://api.twexapi.io● Production Ready
✍️
Write Operation Credentials Guide (TwexAPI Key + Twitter Cookie)
1. TwexAPI Platform Key (Bearer Token): Enter under "API Authorization" below for request billing & authentication.
2. Twitter Account Cookie: For write operations (tweet, like, follow, etc.), provide the target Twitter account's Cookie (e.g. auth_token=...; ct0=...) in the cookie field of Request Body below.
🔑API Authorization
⚙️Parameters (1)
📡
No Response Yet
Configure parameters in the Request tab and click Send Request below.
Request
curl -X GET "https://api.twexapi.io/twitter/string/cookie" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://api.twexapi.io/twitter/string/cookie", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});import requests
response = requests.get(
"https://api.twexapi.io/twitter/string/cookie",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)Response
{
"code": 200,
"msg": "success",
"data": {}
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}