JWT for platform routes; publishable and secret API keys for /api/v1.
Send credentials on every request.
/api/auth/telegram-login//api/auth/send-otp//api/auth/verify-otp/Authorization: Bearer pk_live_… for client apps, or Authorization: Bearer sk_live_… on your server. The legacy ?api_key= query parameter is accepted on v1 only.
| Key | Scope | Safe in a browser? |
|---|---|---|
| pk_live_… | Catalog, checkout create/verify, entitlements, cancel/resume when enabled | Yes |
| sk_live_… | Everything, including refunds and key management | No |
Publishable keys may cancel or resume a subscription only when the app enables allow_client_subscription_changes. Immediate cancellation always requires a secret key, so keep it on your server and call it after your own authorization.
GET /api/v1/me/ returns the effective key type, app binding, permission scopes, and server time.