Answer the question
In order to leave comments, you need to log in
How to make a link to a user who does not have a username?
Good day.
I'm testing core telegram api (not to be confused with bot api).
Made a parsing of the group.
As a result, I get information about all users of the group.
I need to get a link like @kirillvorontsov555, through which you can get to the user and write him a message.
But not all users have username filled in, which is written with a dog in the beginning: @kirillvorontsov555
I only know the user id.
Question: How to make a link to a user who does not have a username, but his id is known?
Answer the question
In order to leave comments, you need to log in
No, this limitation is due to Telegram's privacy policy and abuse prevention.
You can mention the user when sending messages (BOT API), but this is not what you need:
Links tg://user?id= can be used to mention a user by their id without using a username. Please note:
These links will work only if they are used inside an inline link. For example, they will not work, when used in an inline keyboard button or in a message text.
These mentions are only guaranteed to work if the user has contacted the bot in the past, has sent a callback query to the bot via inline button or is a member in the group where he was mentioned.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question