Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Telegram Bot API: Create a link to a specific message in a private chat with a chatbot

I'm working on a telegram chatbot that accepts applications, and the application is sent as a chat message to a potential performer. After that, at some point in time, the manager appoints an application executor (who may already have a large list of application messages) and I need to send him a clickable link to a specific application (message with messageId) in his private chat with the same chatbot.

I tried different options from documentation:

tg://resolve?domain=<username>&post=message_id    //there I try telegram user id or username or bot's username
<id>t.me/<username>/message_id    //user id or username or bot's username
t.me/c/<channel>/message_id    //user id or username or bot's username

But they all returned errors: "Web application not found" or "You do not have permission to view this message" when clicking on the link (by the employee himself) in the employee's chat with the bot.

I am sure what messageId and userId absolutely right cause i update this message successful by the same id and in chat with same user.

Is there a way to do what I'm trying to do?

P.S. Chatbot user work on Windows' or Android' default telegram clients

like image 758
aiswe Avatar asked Jan 26 '26 21:01

aiswe


1 Answers

I've been struggling with this too, and it seems like it's not possible to do this. The docs for https://core.telegram.org/api/links#message-links do say "private groups" at the top, which sounds like it should work. But if you look below where the parameters are defined, it says "Channel or supergroup ID." So I think it doesn't work with "non-super" groups.

Maybe you can solve your problem by forwarding messages? That's what I've been considering.

like image 121
Janek Szynal Avatar answered Jan 29 '26 13:01

Janek Szynal