As the title says, is it possible to get userid using username? I mean, I would like to add a feature to my bot that tells you the user id from an other user using his username.
Does Telegram API give an option to do this?
I believe what you mean by nickname is the username
and userid is the unique id
as described in the API documentation.It is still possible to do a reverse lookup using a bot.
This is possible with a boosted version of the Official Telegram API, known as PWRTelegram API
I quote from the documentation.
Resolving of usernames not only with channels and groups but also with normal users and bots
Update:
Here is a library I made for this purpose:
Update 2:
I no longer maintain the above library, you can however still resolve usernames with a td-cli binary.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With