How to create a direct link to a specific message in a private Telegram bot chat?

I’m developing a Telegram bot for handling job applications. The bot sends applications to potential workers as chat messages. Now I need to give managers a way to quickly access specific application messages in their private chats with the bot.

I’ve tried using different link formats, like:

tg://resolve?domain=botname&post=123456
t.me/botname/123456
t.me/c/botname/123456

But when the worker clicks these links, they get errors like ‘Web application not found’ or ‘No permission to view this message’.

I’m sure the message IDs and user IDs are correct because I can update these messages successfully.

Is there a way to create clickable links to specific messages in a private chat with a Telegram bot? The workers use regular Telegram clients on Windows and Android.

Any help would be great. I’m stuck and not sure how to move forward with this feature.

have u tried using deeplinks? smthn like Telegram: Launch @your_bot might work. the bot can then handle the ‘start’ parameter and redirect to the specific msg. not sure if itll solve ur problem but worth a shot maybe?

Unfortunately, direct links to specific messages in private bot chats aren’t natively supported by Telegram. A workaround could be implementing a custom command in your bot that takes a message ID as a parameter. For example, ‘/goto 123456’. When a user sends this command, your bot could fetch and resend the specific message, effectively ‘jumping’ to it. This approach requires more work on the bot’s side but offers a reliable solution within Telegram’s constraints. You’d need to store message IDs and their content, then program the bot to retrieve and display the requested message when the command is used.

I’ve actually tackled a similar issue in one of my projects. What worked for me was implementing a message retrieval system within the bot itself. Instead of trying to create direct links, I set up a command structure like ‘/fetch [message_id]’. When a manager uses this command, the bot searches its database for the specified message and reposts it in the current chat.

To make it more user-friendly, I added a feature where the bot sends a daily digest to managers with a list of new applications, each entry including the ‘/fetch’ command with the correct message ID. This way, managers can easily access specific applications without needing to remember or search for message IDs.

It’s not as seamless as a direct link, but it’s reliable and works within Telegram’s limitations for private chats. Plus, it gives you more control over access and allows you to implement additional features like message expiration or access logs if needed.