← ClaudeAtlas

tg-miniapp-launch-authlisted

Use when choosing how a Telegram Mini App opens (keyboard, inline or menu button, main app, direct link, startapp, join request) or when a server must trust a Mini App user: validating initData by HMAC or Ed25519, signature in the check string, auth_date, isVersionAtLeast gating, origin protection, test environment and debugging.
serejaris/telegram-skills · ★ 41 · API & Backend · score 87
Install: claude install-skill serejaris/telegram-skills
# tg-miniapp-launch-auth Checked against the official docs on 2026-10-30: Bot API 10.3 (latest, August 24, 2026), Mini Apps page with Recent changes up to 10.1, `telegram-web-app.js?64`. The Mini Apps page doesn't describe origin protection (see below); the changelog does. ## Not verified live No bot, client or device was used to write this skill. These checks wait for a live Mini App: - A fresh `initData` string with `signature` from a live bot in 2026. The repository's tests use synthetic vectors, so they prove this code matches the algorithm below, and only a live string proves Telegram still signs that way. We found no public vector for Telegram's Ed25519 key without a real person's data, so that key is untested here. - Launch behavior on a real iPhone and Android device. The launch table comes from the docs. - Origin protection: what a blocked call looks like, and whether subdomains and redirects count as the Mini App domain. - `mode=fullscreen` in links. ## Pick a launch path | Path | Set up | `initData` | How the app answers | |---|---|---|---| | Inline button | `InlineKeyboardButton.web_app`, private chats only | `user`, `query_id` | `answerWebAppQuery` sends a message on the user's behalf and closes the app | | Menu button | BotFather `/setmenubutton`, or `setChatMenuButton` with `MenuButtonWebApp` for one chat | same as inline button | same as inline button | | Main Mini App | BotFather, then `t.me/<bot>?startapp[=value][&mode=compact]` | `user`, `chat_type`,