Complete Telegram Mini App Data Inspector - Display and test all Telegram WebApp API capabilities in real-time.
β οΈ Important: This app works ONLY inside Telegram. It must be opened through a Telegram bot.
# Just open index.html in your browser
# β
App shows error message (expected - needs Telegram)
# β
Perfect for checking files are readygit init
git add .
git commit -m "TG Data Inspector"
git remote add origin https://github.com/Farfosh/telegram-web-app-pro-bot.git
git push -u origin main
# Then: GitHub β Settings β Pages β Source: main β Save
# URL: https://username.github.io/tg-inspector/npx vercel
# β
Gives you instant HTTPS URL: https://project.vercel.app1. Open @BotFather in Telegram
2. /mybots β Select Your Bot β Bot Settings β Menu Button
3. Enter URL: https://your-deployed-url.com
4. Open bot β Click Menu Button β App launches! π
- Clean Telegram-like design
- Full Light/Dark theme support
- Responsive design with safe areas
- Organized tabs for easy navigation
- Overview - User info, app info, initData viewer, quick actions
- Theme & Colors - All themeParams display, color customization, CSS variables
- Viewport & Safe Areas - Viewport dimensions, safe area insets (visual display)
- Context & Launch - Launch params, chat info, launch source, context actions
- Buttons & Haptics - Main/Secondary/Back/Settings buttons, haptic feedback
- Permissions & Device - Write access, Contact, Biometric, GPS Location, Sensors
- Storage Playground - Cloud Storage + Secure Storage (real Telegram APIs)
- Share & Invoices - Share to Story, Share Message, Open Invoice
- Debug & Event Stream - Popups, QR Scanner, Clipboard, Event logging
- Security Banner - Persistent warning about initDataUnsafe verification
This app now works ONLY inside Telegram (Demo mode removed):
- β
Real data from
window.Telegram.WebApp - β Real API calls (CloudStorage, SecureStorage, BiometricManager)
- β Real Events (viewportChanged, themeChanged, etc.)
- β Real Sensors (Accelerometer, Gyroscope, Location)
- β
Automatic
WebApp.ready()call - β Shows error screen if opened outside Telegram
Supports all Telegram theme colors:
bg_color,text_color,hint_colorbutton_color,button_text_colorsecondary_bg_color,header_bg_colorbottom_bar_bg_color,accent_text_colorsection_bg_color,section_header_text_colorsection_separator_color,subtitle_text_colordestructive_text_color
Colors are automatically applied via CSS Variables.
The app displays a persistent security banner:
β οΈ Security Note: initDataUnsafe is not trusted on the frontend. Any authentication/payment/privileges must be verified on the server via HMAC-SHA256 on initData before accepting any action.
- β Deploy to HTTPS first (required by Telegram)
- β Test opening from Telegram (not browser)
- β Check Event Stream in Debug tab for all actions
- β Use "Load All Keys" in Cloud Storage to see saved data
- β Click "Check Status" for Biometric before authenticating
- β Try sensors on a real mobile device (not desktop)
- β Copy CSS Variables from Theme tab for your own projects
web-app/
βββ index.html # Main interface with all tabs
βββ style.css # Styles (theme-aware, responsive)
βββ app.js # Main logic (Live mode only)
βββ manifest.json # PWA manifest
βββ icon.svg # App icon
βββ package.json # npm config
βββ .gitignore # Git ignore
βββ LICENSE # MIT License
βββ README.md # This file
- User information (avatar, name, username, language, premium)
- App information (platform, version, colorScheme)
- Quick actions (Expand, Ready, Fullscreen)
- initData viewer with Copy function
- Display all themeParams as color swatches
- Change colors (Header, Background, Bottom Bar)
- CSS Variables viewer with Copy
- Viewport dimensions
- Safe Area Insets visual display
- Content Safe Area Insets
- Launch parameters (start_param, query_id)
- Chat information
- Launch source detection
- Actions (sendData, openLink, openInvoice)
- MainButton control
- SecondaryButton control
- BackButton and SettingsButton toggles
- Haptic feedback testing
- Request permissions (Write Access, Contact, Biometric)
- GPS Location (real coordinates)
- Accelerometer (real device values)
- Gyroscope (real device values)
- Device Orientation control
- Cloud Storage - Synced across devices via Telegram Cloud
- Secure Storage - Encrypted storage for sensitive data
- Operations: Set/Get/Remove keys
- Load All Keys - Fetch all existing cloud storage data
- Share to Story
- Share Message
- Open Invoice
- Show Popup/Alert/Confirm
- QR Scanner
- Read Clipboard
- Add to Home Screen
- Real-time Event Stream logging
Solution: This is normal! The app only works inside Telegram. Deploy it and open through a Telegram bot.
Solution: Make sure your URL uses HTTPS. GitHub Pages and Vercel provide free HTTPS.
Solution: Open the app from inside Telegram, not from a regular browser. Telegram themes only work in Telegram.
Solution:
- Requires Telegram version 7.2+
- Device must have physical sensors
- User must grant permission when prompted
Solution: Click the "Load All Keys" button to fetch existing data from Telegram Cloud Storage.
Solution:
- Check if your device supports biometric (fingerprint/face ID)
- Make sure Telegram has permission to use biometric sensors
- Click "Check Status" to see availability
| Metric | Value |
|---|---|
| Lines of Code | ~1,300 lines |
| Total Size | ~80 KB (uncompressed) |
| Load Time | < 1 second |
| Dependencies | Zero! Pure vanilla JS |
| Browser Support | Chrome, Firefox, Safari, Telegram WebView |
| Telegram API Version | 7.2+ (for sensors) |
Important: Never trust initDataUnsafe on the frontend!
Always verify initData on your backend:
// Node.js example
const crypto = require('crypto');
function verifyTelegramData(initData, botToken) {
const params = new URLSearchParams(initData);
const hash = params.get('hash');
params.delete('hash');
const dataCheckString = Array.from(params.entries())
.sort(([a], [b]) => a.localeCompare(b))
.map(([k, v]) => `${k}=${v}`)
.join('\n');
const secretKey = crypto
.createHmac('sha256', 'WebAppData')
.update(botToken)
.digest();
const expectedHash = crypto
.createHmac('sha256', secretKey)
.update(dataCheckString)
.digest('hex');
return expectedHash === hash;
}To test your Mini App without affecting production:
iOS:
- Tap 10 times on Settings icon β Accounts β Login to another account β Test
Telegram Desktop:
- Open Settings β Shift + Alt + Right click "Add Account" β Select "Test Server"
macOS:
- Click Settings icon 10 times β β + click "Add Account" β Log in
Note: Test environment is separate - you need a new user account and bot via @BotFather. You can use HTTP links (without TLS) in test mode.
iOS:
- Tap 10 times on Settings β Toggle "Allow Web View Inspection"
- Connect iPhone to Mac via USB
- Open Safari β Develop β [Your Device Name]
- Launch Mini App on iOS - it appears in Develop menu
Android:
- Enable USB-Debugging on device
- In Telegram Settings, scroll down, press and hold version number twice
- Choose "Enable WebView Debug"
- Connect to computer β Open
chrome://inspect/#devicesin Chrome - Launch Mini App - it will appear for inspection
Telegram Desktop (Windows/Linux):
- Download Beta Version
- Settings β Advanced β Experimental β Enable webview inspection
- Right click in WebView β Choose "Inspect"
Telegram macOS:
- Download Beta Version
- Click 5 times on Settings icon β Enable "Debug Mini Apps"
- Right click in Mini App β Choose "Inspect Element"
This app supports the latest Telegram WebApp API features:
- β hideKeyboard() - Hide virtual keyboard
- β DeviceStorage - Persistent local storage (removed in this app - uses CloudStorage instead)
- β SecureStorage - Encrypted local storage for sensitive data
- β Full-screen Mode - requestFullscreen(), exitFullscreen()
- β Safe Area Insets - safeAreaInset, contentSafeAreaInset
- β Homescreen Shortcuts - addToHomeScreen(), checkHomeScreenStatus()
- β Emoji Status - setEmojiStatus(), requestEmojiStatusAccess()
- β Media Sharing - shareMessage(), downloadFile()
- β Geolocation - LocationManager for GPS access
- β Device Motion - Accelerometer, Gyroscope, DeviceOrientation
- β Orientation Lock - lockOrientation(), unlockOrientation()
- β Subscription Plans - Paid subscriptions with Telegram Stars
- β Loading Screen Customization - Custom icons and colors
- β SecondaryButton - Second bottom button
- β Bottom Bar Color - setBottomBarColor()
- β Share to Story - shareToStory() method
See full changelog on Telegram Docs
| Feature | Status |
|---|---|
| β 10 Organized Tabs | All WebApp API features covered |
| β Live Mode Only | Real Telegram data (no demo) |
| β Event Stream | Real-time logging of all actions |
| β Theme-Aware | Auto Dark/Light theme support |
| β Mobile-First | Optimized for mobile devices |
| β Safe Areas | Full safe area inset support |
| β Copy Features | Copy initData, CSS vars, etc. |
| β Zero Dependencies | Pure vanilla JavaScript |
| β Security-Aware | Persistent security warnings |
| β Real Storage APIs | CloudStorage + SecureStorage |
| β Real Sensors | Accelerometer + Gyroscope + Location |
| β Biometric Auth | Fingerprint/Face ID support |
- Requirements: Telegram WebApp API 6.1+ (7.2+ for sensors)
- Error Handling: Global error handlers + try-catch blocks
- Storage: Uses Telegram Cloud Storage (not localStorage)
- Sensors: Uses Telegram's native Accelerometer/Gyroscope APIs
- Location: Uses browser Geolocation API
- Theme: Automatically applies via CSS variables
- Safe Areas: Respects env(safe-area-inset-*)
Made with β€οΈ for Telegram Mini Apps
Need help? Check the Common Issues section above.