For TON builders, the change puts a small interactive interface directly in a message bubble rather than behind a button that opens a web page. Telegram added widgets in Bot API 10.4, dated Nov. 9.
The 4 KB figure is a compressed-code ceiling, not a requirement that every app be that size. Each widget is a self-contained HTML document with inline styling and JavaScript, capped at 32 KB before compression and 4 KB afterward.
Telegram runs the JavaScript in a QuickJS sandbox and draws the interface itself, rather than using a browser-style WebView. Widgets have no direct network access: they send requests through Telegram to their bot, which can update the widget's data. Their code stays fixed after the message is sent.
That makes widgets distinct from existing Mini Apps, which are developer-hosted web pages opened on demand. Widgets remain visible as users scroll the chat, but cannot accept keyboard input. Telegram's guide directs developers to link to a bot or Mini App for anything larger.
Payments Through the Built-In Wallet
The documented payment flow uses Telegram's built-in wallet and TON Connect transaction formats. Developers can reuse their TON Connect code without setting up a separate wallet connection or bridge for the widget.
It builds on Telegram's native Gram Wallet, which TON's website describes as a non-custodial wallet developed by Telegram. Gram is TON's native coin, formerly called Toncoin. The Defiant previously covered the wallet's wider rollout.
A widget asks its bot to prepare a transaction, then opens Telegram's wallet confirmation window showing the bot, amounts and destinations. The user must approve. Wallet access depends on app support and regional availability, according to the guide.
Telegram also instructs developers to verify the sender, recipients, amounts and transaction outcome onchain before treating a payment as complete—not simply rely on the returned message hash.