Sending Telegram HTML Widgets via MTProto with Telethon

Telegram now supports HTMLBubbles, which let bots deliver interactive mini-apps inside chat messages without the usual Mini App infrastructure. The article shows how to send them through Telethon by adapting the MTProto layer and highlights practical compatibility pitfalls.

Sending Telegram HTML Widgets via MTProto with Telethon

Key points

  • You can build a small HTMLBubbles-based game or interactive tool using Telethon and MTProto.
  • The public Bot API does not yet provide a method for these widgets, so developers must work with protocol-level features.
  • The guide covers schema discrepancies, manual message-type definitions, and a parser fix for bots administering channels.

Context

For you, this experiment demonstrates how new Telegram capabilities can be tested before they receive convenient Bot API support. It also illustrates the maintenance risks of relying on undocumented or rapidly changing protocol behavior in production systems.

What this means for you

Directly applicable

You can use the described Telethon and MTProto approach to prototype interactive Telegram widgets, while accounting for protocol changes and parser edge cases.

Who benefits: Developers of Telegram bots and interactive chat experiences benefit from a practical example of using protocol features before official Bot API support becomes available.

Share article:

Integrate a system without docs?

API development: connect even poorly documented interfaces reliably, with tests and monitoring.