get_web_app_url()

Client.get_web_app_url()

Returns an HTTPS URL of a Web App to open from the side menu, a KeyboardButton button with web app type, or an InlineKeyboardButton button with web app type.

Usable by Users Bots
Parameters:
  • bot_user_id (int | str) – Unique identifier (int) or username (str) of the target bot.

  • url (str, optional) – The URL from KeyboardButton button with web app type, or an InlineKeyboardButton button with web app type, or an None when the bot is opened from the side menu.

  • platform (ClientPlatform, optional) – The platform on which the link will be opened.

Returns:

str – On success, returns the url of a Web App.

Example

link = await client.get_web_app_url(bot_user_id)