telegramtelegram-botpython-telegram-bot

How to redirect user to settings menu of telegram where they can enter username


Can we open telegram's setting menu with any code or redirecting? I made a bot on telegram which needs username for a specific actions. If a user don't have any username then the bot replies something like 'Username not found please go to settings and set a username to continue'. Instead of this I want to redirect the user to settings menu where username can be added. Any suggestions how I can do that? Like I have seen many bots who redirect users to groups list so that they can add them to any group. Can we do same for settings menu?


Solution

  • At the moment, Telegram does not allow users to open the profile settings with an url, but you can click on this url on a Telegran app to open the settings menu: tg://settings (does not seems to work on my Android with Telegram Beta but on TGDesktop it works just fine). The "open groups list" is a deep linking url: https://t.me/usernameBot?startgroup=test. If specified, the startgroup parameter asks the user to select a group from the list.


    For more info:

    Deep Linking

    Deep Link Channel