Search code examples
urltelegramtelegram-bot

Telegram URL to send message to specific bot


Is it possible to craft a t.me URL that prompts the user to send a specific message to a specific bot. The closest I've found so far is t.me/share/url?url=my%20message, but that doesn't specify a username so the user has to choose one. I don't see the t.me URLs documented anywhere.

Note: this is not the same as sending a message via the API.


Solution

  • You can use deep linking to bot, use following format like this link:

    https://t.me/username?start=<token>
    

    Your backend will receive /start <token> . The user however will just see normal

     /start
    

    on their chat window.