Skip to main content
POST
/
v1
/
accounts
/
cookies
Sync Account
curl --request POST \
  --url https://api.lobstr.io/v1/accounts/cookies \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "type": "<string>",
  "cookies": {}
}
'
{
  "id": "<string>",
  "object": "<string>",
  "status_code": 123,
  "status_text": "<string>"
}

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 allows you to synchronize cookies for a specific platform account type. It accepts a JSON payload containing the account type and required cookie values, and returns a task ID to track the synchronization process.

Headers

Authorization
string
required
Your API authentication token. Value: Token YOUR_API_KEY
Content-Type
string
required
Must be application/json. Value: application/json

Request Body

type
string
required
Account type identifier (e.g., twitter-sync, facebook-sync). Example: "twitter-sync"
cookies
object
required
Object containing required cookie name-value pairs. Example: {"auth_token": "...", "ct0": "..."}

Response Field Explanations

id
string
Synchronization task identifier. Example: "984e0a7996aeae956793b8967cd3e122"
object
string
Always “synchronize-cookies”. Example: "synchronize-cookies"
status_code
integer
Task status code (100 = created). Example: 100
status_text
string
Human-readable status. Example: "created"
Use browser developer tools to extract cookies. Open DevTools → Application → Cookies, and copy the required cookie values.
The returned task ID can be used with the Check Sync Status endpoint to monitor synchronization progress.
Ensure cookies are fresh and valid. Expired or invalid cookies will result in synchronization failure.
Use List Account Types endpoint first to discover which cookies are required for each platform.

Code Examples

curl -X POST "https://api.lobstr.io/v1/accounts/cookies" \
  -H "Authorization: Token YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "twitter-sync",
    "cookies": {
      "auth_token": "<cookie.auth_token>",
      "ct0": "<cookie.ct0>"
    }
  }'

Response

200
{
  "id": "984e0a7996aeae956793b8967cd3e122",
  "object": "synchronize-cookies",
  "status_code": 100,
  "status_text": "created"
}
400
{
  "detail": "Invalid account type or missing required cookies."
}
401
{
  "detail": "Invalid token."
}