Mini App Tester

Mock
Properties
version
—
platform
—
colorScheme
—
isActive
—
isExpanded
—
isFullscreen
—
isOrientationLocked
—
isClosingConfirmation
—
isVerticalSwipes
—
viewportHeight
—
viewportStableH
—
headerColor
—
backgroundColor
—
bottomBarColor
—
initData
initDataUnsafe
Theme Params
bg_color
text_color
hint_color
link_color
button_color
button_text_color
secondary_bg_color
header_bg_color
bottom_bar_bg_color
accent_text_color
section_bg_color
section_header_text_color
section_separator_color
subtitle_text_color
destructive_text_color
WebApp 18
ready()
expand()
close()
sendData()
switchInlineQuery()
setHeaderColor()
setBackgroundColor()
setBottomBarColor()
enableClosingConfirmation()
disableClosingConfirmation()
enableVerticalSwipes()
disableVerticalSwipes()
requestFullscreen()
exitFullscreen()
lockOrientation()
unlockOrientation()
openLink()
openTelegramLink()
isVersionAtLeast()
hideKeyboard()
Buttons 4
MainButton
Clicking the button triggers mainButtonClicked event
SecondaryButton
BackButton
BackButton
Click triggers backButtonClicked event
SettingsButton
SettingsButton
Click triggers settingsButtonClicked event
Popups & Alerts 5
showAlert()
showConfirm()
showPopup()
showScanQrPopup()
readTextFromClipboard()
Haptic Feedback 3
impactOccurred()
notificationOccurred()
selectionChanged()
Cloud Storage 6
setItem()
getItem()
getKeys()
removeItem()
Device Storage 4
setItem()
getItem()
removeItem()
clear()
Secure Storage 5
setItem()
getItem()
restoreItem()
removeItem()
clear()
Sensors 3
Accelerometer
DeviceOrientation
Gyroscope
Biometrics 5
init()
requestAccess()
authenticate()
updateBiometricToken()
openSettings()
Location 3
LocationManager.init()
LocationManager.getLocation()
LocationManager.openSettings()
Invoice & Story 3
openInvoice()
shareMessage()
Permissions & Auth 3
requestWriteAccess()
requestContact()
requestChat()
Emoji, Screen, File 5
Home Screen
addToHomeScreen()
checkHomeScreenStatus()
Emoji Status
File Download
Event Log 0
Listening to 45 events
No events. Use methods above to generate events.

Mini App Tester lets you test the Telegram WebApp JavaScript API (Telegram.WebApp) without writing code. In a normal browser it runs in mock mode and emulates the API; opened inside Telegram, it talks to the real API of the current client. Use it to test a Telegram Mini App feature before you build it, or to see how a particular client behaves.

How to use the Telegram Mini App tester

  1. Open this page in any browser. Mock mode starts automatically and emulates Telegram.WebApp.
  2. Expand a method group, call methods and follow the results in the event log and the live properties panel.
  3. To test inside Telegram, set https://telegram-bot-api.info/telegram-mini-app-tester.html as the Mini App URL of a bot in @BotFather (/newapp or the menu button settings). No hosting is needed.
  4. Open it on iOS, Android and desktop and compare version, platform, colorScheme, initData, themeParams and the safe areas.

What you can test

The event log records 45+ events with timestamps, such as themeChanged, viewportChanged, mainButtonClicked and fullscreenChanged, so you can see exactly what your handlers will receive.

Telegram Web App test: mock mode vs. real Telegram

Mini Apps were originally called Web Apps, which is why the API object is still named Telegram.WebApp. Mock mode is for UI and flow: it shows which calls exist, what they return and which events fire, and it emulates storage in localStorage. It can't reproduce native popups, haptics or real user data, and its initData is a sample that Telegram never signed. Inside Telegram the tester switches to the real API, so initData is genuine and every call reaches the actual client. How to validate that data on your server is shown in how to test a Telegram Mini App.

Privacy

The tester runs entirely in your browser, needs no bot token and doesn't call the Bot API. Mock storage stays in your browser's localStorage.

New to Mini Apps? Start with how to create a Telegram bot and get its token. The Bot API 10.2 origin protection for Mini Apps is covered in what's new in Bot API 10. To point a menu button at your Mini App via the API, call setChatMenuButton in the Bot API Tester, and look up any method in Swagger or the methods reference.

Frequently asked questions

How can I test a Telegram Mini App online without Telegram?

Open the Mini App Tester in any browser. Its mock mode emulates Telegram.WebApp, so you can call methods, trigger events and inspect properties without a bot or a Telegram client.

Can I use the Mini App Tester as my bot's Mini App?

Yes. Set https://telegram-bot-api.info/telegram-mini-app-tester.html as the Mini App URL in @BotFather, via /newapp or the menu button settings. Inside Telegram it uses the real WebApp API, and you don't need any hosting.

Which Telegram WebApp API features does it cover?

WebApp core methods, MainButton, SecondaryButton, BackButton and SettingsButton, popups, HapticFeedback, CloudStorage, DeviceStorage, SecureStorage, sensors, biometrics, location, permissions, invoices and stories, emoji status, fullscreen and file downloads, plus a log of 45+ events.

Is the initData in mock mode valid?

No. Mock mode uses sample data that Telegram never signed, so it fails HMAC validation by design. Open the tester inside Telegram to get real initData for testing your server-side validation.

Do I need a bot token to use the Mini App Tester?

No. The page doesn't call the Bot API at all. You only need a bot if you want to open the tester inside Telegram as a Mini App.