telegram-webapps
Installation
SKILL.md
Telegram Mini Apps (Web Apps)
Telegram Mini Apps are web pages that run inside Telegram — they get the user's identity, theme, and can send data back to the bot. The experience feels native because Telegram renders it inside the app with native header/footer controls.
How it Works
- User opens the Mini App (via bot button, inline button, or direct link)
- Telegram loads the URL in an in-app browser and injects
window.Telegram.WebApp - The app reads user info, renders UI, user interacts
- Data goes back to the bot via
sendData()(keyboard-button mode) or HTTP POST withinitDataas auth
Step 0: Local Development Setup
Without a proper local dev setup, every code change requires a full deploy. Solve this first.
Copy assets/miniapp-mock.js into the project. Add it as the first <script> in <head>, before the Telegram SDK: