Mini Apps, Auto-Translation & Public Endpoints
How Telegram Mini App WebAppData HMAC-SHA256 validation works, BYOK translation API integration, and public StreamBot endpoints.
Telegram Mini App authentication (WebAppData)
When a user opens the Mini App of a Catalog Bot or Packs & Media Bot, the Telegram client passes a signed initData payload. StreamBot’s Mini App endpoints (/api/miniapp/public/*) verify every request according to Telegram’s official specification:
- Compute the secret key
HMAC-SHA256("WebAppData", bot_token). - Verify the
hashover the alphabetically sortedinitDatafields. - Validate
auth_datefreshness to prevent replay attacks.
Mini App public endpoints
| Endpoint | Method | Purpose |
|---|---|---|
/api/miniapp/public/{botId}/catalog | GET | Returns published titles, modules, covers, and seasons for the Catalog Bot Mini App. |
/api/miniapp/public/{botId}/packs | GET | Returns active packs, covers, previews, and pricing for the Packs & Media Mini App. |
/api/miniapp/public/{botId}/request | POST | Triggers episode delivery or checkout generation inside the authenticated user’s private chat with the bot. |
Automatic Translation integration (BYOK)
Under Auto translation (/panel/translation), you can connect your own API key (Google Cloud Translation or DeepL) to translate TMDB/AniList synopses in Catalogs and the Promo Art Studio:
- Your API key is stored encrypted with AES-256-GCM in
user_translation_keys. - Deleting your account under Profile & security permanently erases all stored translation keys and credentials.