Skip to content
TGWAY
Channels & Bots STEP 71 / 99

Telegram Bot Menu Button: Open a Mini App, Not Commands

Change a Telegram bot's menu button from the command list to a mini app in BotFather or with setChatMenuButton, for one user or all, and keep /start working.

  • Applies toDevelopers
  • LevelL4
  • Reading time3 min
  • Verified

The short answer

  1. 1The menu button shows the command list by default; it can open a mini app instead.
  2. 2Use @BotFather, or setChatMenuButton with a chat_id to change it for one user.
  3. 3Keep /start and /help working after the switch.
In this article
  1. What the menu button is
  2. Two ways to change it
  3. A different button for each user
  4. Keep your commands working
  5. FAQ
  6. At a glance

What the menu button is

In a private chat with a bot, the menu button sits next to the message field. By default, tapping it shows the list of commands the bot registered, with their descriptions. You can change it to open a mini app instead, so users get into your bot's interface with one tap and never have to remember a command. For how users experience mini apps, see how to use Telegram mini apps.

MenuButton typeWhat a tap doesSuits
commandsShows the command listBots that work through a few commands
web_appOpens the mini app you set, with a button label you chooseBots with a real interface: orders, bookings, games
defaultWhatever the default behaviour isUndoing a change

Two ways to change it

Without code

In @BotFather, choose your bot, open its settings, find the menu button option, and set the mini app's URL and the button label.

With the Bot API

Call setChatMenuButton. Leave out chat_id and you change the default for every user; include it and only that one user's chat changes.

curl https://api.telegram.org/bot123456:ABC-EXAMPLE/setChatMenuButton \
  -H "Content-Type: application/json" \
  -d '{"menu_button":{"type":"web_app","text":"Order",
       "web_app":{"url":"https://example.com/app"}}}'

getChatMenuButton shows the current setting. The mini app URL must use HTTPS. The token and URL above are examples; see your first Bot API requests.

A different button for each user

Because chat_id targets one user, you can give people different buttons. For example, users who have finished signing up get a "My orders" mini app button, while newcomers keep the command list with a getting-started command.

Keep your commands working

Switching the menu button to a mini app only removes the command list from that button. Users who type / still see your commands, so keep /start and /help working; see registering bot commands.

FAQ

How do I make my Telegram bot's menu button open a mini app?

In @BotFather set the menu button's URL and label, or call setChatMenuButton with type web_app and an HTTPS URL.

Can different users see different menu buttons?

Yes. Call setChatMenuButton with that user's chat_id to change only their chat.

Do my commands still work after changing the menu button?

Yes. Typing / still shows them, so keep /start and /help handled.

Sources

Summary

At a glance

Telegram Bot Menu Button: Open a Mini App, Not Commands — at a glance illustration
  1. 1Types

    commands, web_app or default.

  2. 2Scope

    No chat_id changes everyone; a chat_id changes one user.

  3. 3Safety

    Verify mini app user data on your server.

Share this guide

Send it to a friend who has the same question.

Telegram WhatsApp
More

Open on your phonePoint your phone camera here to open this guide.

Updated

Related articles

View all ›