Skip to main content
Post

Telegram bots can now send interactive HTML widgets in messages

Telegram bots can now send interactive HTML widgets that render inside a message bubble. Bot API 10.4 adds them with dynamic layouts, custom sizing and interactive elements.

A widget is one self-contained HTML document with inline CSS and JavaScript, limited to 4,096 bytes after compression. It can send a query to the bot and get an answer back, so the interface reacts without leaving the chat. Bots can update a widget in place, and a shared widget lets one interface appear in many messages and change from one central setting.

Widgets also tie into Telegram's built-in wallet. A widget can ask the user to send a TON transaction or sign data, and bots can read a user's wallet card, including balances and NFT stickers.

The same release adds ephemeral replies, so a button press can trigger a reply that only the person who tapped can see.

This is a developer feature, so you'll only see widgets from bots that adopt it. For now, widgets in production work only in a private chat with the bot and can't be forwarded.

View the original announcement

Cloud-synced messaging app for chats, groups and channels, with an open Bot API. Bot API 10.4 lets bots send interactive HTML widgets inside messages.

Profile
Loading replies