"""TikTok web-client constants + device params, and the request-signing reality.

TikTok gates almost every /api call behind a per-request signature: an msToken in the
cookies PLUS an X-Bogus / X-Gnarly query param generated by obfuscated client JS. We
attach the borrowed msToken (some read endpoints accept it), but TikTok rotates the
X-Bogus/X-Gnarly scheme constantly and generating it outside a real browser is the
known hard wall for every free TikTok client. So reads here are best-effort, and signed
writes (and video upload) realistically need OpenSwarm's in-app browser agent, which
drives the real logged-in session and is therefore free AND undetectable AND able to do
everything a human can. This module isolates the brittle bits; see tiktok_sign.py.
"""

API = "https://www.tiktok.com/api"
DOMAIN = "tiktok.com"
MSTOKEN_COOKIE = "msToken"

# Static-ish web/device params TikTok expects on every /api call.
DEVICE_PARAMS = {
    "aid": "1988",
    "app_name": "tiktok_web",
    "app_language": "en",
    "channel": "tiktok_web",
    "device_platform": "web_pc",
    "cookie_enabled": "true",
    "screen_width": "1512",
    "screen_height": "982",
    "browser_language": "en-US",
    "browser_platform": "MacIntel",
    "browser_name": "Mozilla",
    "browser_version": "5.0",
    "browser_online": "true",
    "timezone_name": "America/Los_Angeles",
    "os": "mac",
    "region": "US",
    "priority_region": "US",
    "language": "en",
}
