The short answer
- 1A bot can add an item to the paperclip menu or side menu that opens its mini app.
- 2Currently only major advertisers' bots can use it; every bot can on the test server.
- 3startattach values arrive as start_param; verify initData on your server.
In this article
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 point | Which bots | Where users open it |
|---|---|---|
| Menu button | All bots | Next to the message field in the bot's chat |
| Inline button, direct link | All bots | A button on a message, a t.me link |
| Attachment menu, side menu | Major advertisers' bots (all bots on the test server) | The paperclip button in any chat |
How a user adds the bot
- The user opens the bot's attachment menu install link.
- 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.
- 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.
- 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
At a glance
- 1Availability
Major Telegram Ad Platform advertisers; all bots on the test server.
- 2Install
User confirms, accepts terms, optionally allows messages.
- 3Links
?startattach= passes start_param; choose limits chat types.
Updated