cookies

Upload Cookie File

Upload a new cookie file for authenticated TikTok scraping.

The cookies should be in Playwright-compatible format with fields:

  • name, value, domain, path, expires, httpOnly, secure, sameSite

Empty cookie arrays and missing filenames are rejected with 422 via the schema's Field constraints — see api/schemas/cookies.py.

post/api/cookies/upload

Request

  • Base URL: https://api.kolens.ai (the document declares no server; this is the origin it was published from)
  • URL: https://api.kolens.ai/api/cookies/upload
  • Auth: HTTP bearer

Request body

filenamestring required

Name of the cookie file

cookiesobject[] required

Array of cookie objects (Playwright format) — must be non-empty

descriptionstring nullable

Optional description

Example request

{
  "cookies": [
    {
      "domain": ".tiktok.com",
      "expires": 1735689600,
      "httpOnly": true,
      "name": "sessionid",
      "path": "/",
      "sameSite": "Lax",
      "secure": true,
      "value": "abc123..."
    }
  ],
  "description": "Production account cookies",
  "filename": "tiktok_cookies_2026.json"
}

Response

Successful Response

idstring required
api_key_idstring required
filenamestring required
upload_timestring date-time required
is_activeboolean required
descriptionstring nullable required
last_used_timestring date-time nullable required
cookie_countinteger required

Number of cookies in the file

Changes

No recorded changes to this operation across all 1 revision of this API.