Skip to content

API reference

The complete reverse-mapped API reference — every network call the app makes, 64 requests across 19 groups, with real saved responses — is the Postman collection in docs/api/ in the repo (published as a deep dive). Import chorki-api.postman_collection.json into Postman or Hoppscotch together with chorki-api.postman_environment.json.

Variable Value Purpose
static_base https://api-static.chorki.com Catalog/content — GET, CDN-cached (7-day max-stale). /v1, /v2.
dynamic_base https://api-dynamic.chorki.com Auth + user data & writes. /v1–/v3.
ipinfo_base https://ipinfo.chorki.com/api/v2 Geo / VPN detection (sets country).
matomo_base https://analytics.chorki.com Matomo analytics.
frontend_base https://www.chorki.com Captcha page + in-app WebViews.
video_cdn_base https://video.chorkicdn.com HLS playlists / segments.

Staging (with USE_STAGING=true): api-static-porikkhamulok.chorki.net / api-dynamic-porikkhamulok.chorki.net — see lib/core/constant/api_url_const.dart.

Everything in Networking applies: country / platform / language query params, bearer auth, the timeout ladder, and the static-GET cache.

  1. Obtain a bearer token via phone-OTP, email/password, or a social flow — returned as result.token.
  2. All authenticated requests send it as Authorization: Bearer <token> (set the token variable in the collection environment).
  3. register, send-otp and every login require a Cloudflare Turnstile captcha token from the {{frontend_base}}/captcha webview. It is short-lived and single-use.