Skip to content
TGWAY
Channels & Bots STEP 78 / 99

Add a Telegram Bot to the Attachment Menu

Attachment menu bots open a mini app from the paperclip button in any chat. Who can use it, how users add it, startattach links and checking initData.

  • Applies toDevelopers
  • LevelL4
  • Reading time3 min
  • Verified

The short answer

  1. 1A bot can add an item to the paperclip menu or side menu that opens its mini app.
  2. 2Currently only major advertisers' bots can use it; every bot can on the test server.
  3. 3startattach values arrive as start_param; verify initData on your server.
In this article
  1. What attachment menu integration is
  2. Not every bot can use it
  3. How a user adds the bot
  4. Opening it straight from a link
  5. What the mini app has to do
  6. FAQ
  7. At a glance

What attachment menu integration is

When you tap the paperclip (attach) button in the message field, Telegram shows items such as photos, files and location. A bot can add its own item to this menu, or to the app's side menu, that opens its mini app. Users can then open that mini app from the paperclip button in any chat they happen to be in.

Not every bot can use it

According to the official documentation, attachment menu integration is currently available only to bots of major advertisers on the Telegram Ad Platform. On the development test server, however, every bot can try it. For an ordinary bot, the realistic entry points are the menu button and the main mini app; see the bot menu button.

Entry pointWhich botsWhere users open it
Menu buttonAll botsNext to the message field in the bot's chat
Inline button, direct linkAll botsA button on a message, a t.me link
Attachment menu, side menuMajor advertisers' bots (all bots on the test server)The paperclip button in any chat

How a user adds the bot

  1. The user opens the bot's attachment menu install link.
  2. The app asks whether to add the bot to the attachment menu. The first time, the user has to accept the mini app terms of use.
  3. If the bot asked for it, the app also asks whether the bot may send messages. If the user allows it, the bot can message that user first.
  4. From then on the bot appears under the paperclip button (or in the side menu), and tapping it opens the mini app.

Opening it straight from a link

An installed attachment-menu mini app can be opened directly from a link (the bot name and value are examples):

https://t.me/sample_help_bot?startattach=coupon_10

The value after startattach reaches the mini app as start_param; use it to decide which screen to show first. To let the user choose which chat to open it in, add choose with the chat types allowed: users, bots, groups or channels.

What the mini app has to do

A mini app opened from the attachment menu receives user data in initData, and it can include details about the chat the user was looking at. Check the signature on your server before using any of it; see verifying mini app users.

FAQ

Can any bot be added to the Telegram attachment menu?

No. The official documentation says it is currently limited to major advertisers on the Telegram Ad Platform; all bots can test it on the test server.

What does startattach do?

It opens an installed attachment-menu mini app from a link and passes its value to the app as start_param.

What can an ordinary bot use instead?

The menu button, the main mini app, inline buttons and direct links.

Sources

Summary

At a glance

Add a Telegram Bot to the Attachment Menu — at a glance illustration
  1. 1Availability

    Major Telegram Ad Platform advertisers; all bots on the test server.

  2. 2Install

    User confirms, accepts terms, optionally allows messages.

  3. 3Links

    ?startattach= passes start_param; choose limits chat types.

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 ›