I have a common server and backend (written in Python) for several Telegram bots, each bot has access to a mini-application. When opening this web application, a backend request must be executed, and database entries corresponding to a specific bot must be selected – this data will be displayed in the web application. The problem is that it is not entirely clear how it can be determined which bot is opening the mini-application. The only way seems to be to make a request to the backend via the bot id. But according to the Telegram Mini Apps documentation, it is impossible to get information about the bot through the object window.Telegram.WebApp
. So, the question is: is there any other possible way to get information about the bot, including its ID, from the Telegram mini-application? Or is this possible only when executing the getMe method via the Telegram Bot API on the server? And if so, is it possible to somehow transfer information from the server to the mini-application when it is opened from the bot (that is, without making requests to the server from the mini-application)?
In search of a solution, I studied the documentation on Telegram Mini Apps and Telegram Bot API, and also searched on stackoverflow and github, but did not find anything that would help to find the answer to the question.