Documentation Index
Fetch the complete documentation index at: https://docs.lobstr.io/llms.txt
Use this file to discover all available pages before exploring further.
This endpoint updates and synchronizes cookies for an existing account using its account hash. Use this when your account cookies have expired or need to be refreshed.
Your API authentication token. Value: Token YOUR_API_KEY
Must be application/json. Value: application/json
Request Body
Existing account hash to update. Example: "abfeb440ceccdfab974e8d261836c9d6"
Account type identifier. Example: "twitter-sync"
Object containing updated cookie name-value pairs. Example: {"auth_token": "...", "ct0": "..."}
Response Field Explanations
Synchronization task identifier. Example: "7966b678b6b63ef599deeea99cb2b219"
Always “synchronize-cookies”. Example: "synchronize-cookies"
Task status code (100 = created). Example: 100
Human-readable status. Example: "created"
Refresh cookies immediately when you notice status_code_info showing ‘cookies_expired’ in List Accounts or Get Account Details.
Use the returned task ID with Check Sync Status to monitor the refresh process.
Refreshing cookies preserves all account settings and limits. You don’t need to reconfigure the account after refresh.
Set up monitoring to check account status regularly and automate cookie refresh when needed.
Code Examples
curl -X POST "https://api.lobstr.io/v1/accounts/cookies" \
-H "Authorization: Token YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"account": "abfeb440ceccdfab974e8d261836c9d6",
"type": "twitter-sync",
"cookies": {
"auth_token": "<cookie.auth_token>",
"ct0": "<cookie.ct0>"
}
}'
Response
{
"id": "7966b678b6b63ef599deeea99cb2b219",
"object": "synchronize-cookies",
"status_code": 100,
"status_text": "created"
}
{
"detail": "Invalid cookies or account type mismatch."
}
{
"detail": "Account not found."
}