Gem: Telegram How To

Deep links: start, startgroup, startchannel and startapp

What it is

A deep link is a `t.me` link to a bot with a parameter at the end, so the bot knows where a person came from or what to open. `start` opens a private chat, `startgroup` adds the bot to a group, `startchannel` adds it to a channel as an admin, and `startapp` opens its Mini App.

How to do it

  1. Private chat: `https://t.me/your_bot?start=spring_sale`. A Start button… Private chat: `https://t.me/your_bot?start=spring_sale`. A Start button replaces the input bar, even for people who already started the bot; tapping it sends `/start spring_sale`.
  2. Group: `https://t.me/your_bot?startgroup=spring_sale`. The person picks a… Group: `https://t.me/your_bot?startgroup=spring_sale`. The person picks a group; the bot gets `/start@your_bot spring_sale`. Add `&admin=delete_messages+pin_messages` to ask for admin rights.
  3. Channel: `https://t.me/your_bot?startchannel&admin=post_messages+edit_messages`.… Channel: `https://t.me/your_bot?startchannel&admin=post_messages+edit_messages`. The person picks a channel; the bot joins as an admin.
  4. Mini App: `https://t.me/your_bot?startapp=spring_sale` opens the bot's main… Mini App: `https://t.me/your_bot?startapp=spring_sale` opens the bot's main Mini App, which reads the value as `start_param`. Add `&mode=compact` for half height or `&mode=fullscreen`.

Watch out

With Gem

Gem makes these links for every project: `t.me/gembot?startapp=<name>` opens its Mini App page, and `t.me/gembot?start=<name>` its chat in @gembot. Invites go out as `gem.bot/<name>?i=<code>` or through Telegram's share box, and the first invite counts.

Sources

Open in Telegram ↗