Authentication

JWT for platform routes; publishable and secret API keys for /api/v1.

AGENTS.md

Send credentials on every request.

POST/api/auth/telegram-login/
POST/api/auth/send-otp/
POST/api/auth/verify-otp/

API key header

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.

KeyScopeSafe in a browser?
pk_live_…Catalog, checkout create/verify, entitlements, cancel/resume when enabledYes
sk_live_…Everything, including refunds and key managementNo

Client-side subscription changes

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.

Diagnostics

GET /api/v1/me/ returns the effective key type, app binding, permission scopes, and server time.