API & integrations1 min read

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:

  1. Compute the secret key HMAC-SHA256("WebAppData", bot_token).
  2. Verify the hash over the alphabetically sorted initData fields.
  3. Validate auth_date freshness to prevent replay attacks.

Mini App public endpoints

EndpointMethodPurpose
/api/miniapp/public/{botId}/catalogGETReturns published titles, modules, covers, and seasons for the Catalog Bot Mini App.
/api/miniapp/public/{botId}/packsGETReturns active packs, covers, previews, and pricing for the Packs & Media Mini App.
/api/miniapp/public/{botId}/requestPOSTTriggers 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.
Didn’t find what you need?

Talk to our team via live chat or open authenticated support in the dashboard.

Mini Apps, Auto-Translation & Public Endpoints — Documentation Center — StreamBot