check_download_file_params()

async Client.check_download_file_params()

Check if a Mini App can request the download of a specific file.

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

  • file_name (str) – The filename from the web_app_request_file_download event.

  • url (str) – The URL from the web_app_request_file_download event.

Returns:

bool – On success, True is returned.

Example

can_download = await app.check_download_file_params("my_bot", "file.pdf", "https://example.com/file.pdf")