pythonparsingtelegramtelethonpyrogram

Do I need to create a separate api_hash and api_id for each, or can I somehow parse messages from multiple users from the same pair of api_hash/id?


I need the user to be able to authorize his telegram account and the system to gain access to parsing messages from his account. There is no way to quickly create an application and get api_id and api_hash for each new user. Can I parse multiple telegram accounts from one - my api_id and api_hash? If not, can you please suggest some other possible solution to the problem?

This is necessary to receive new messages from chats and record them to the server. A person logs into an account through a bot in which you enter your phone number and then he waits for a code from telegram to create a session. It is necessary to parse multiple sessions from the same pair of api_id and api_hash


Solution

  • You can use the same API ID and API hash for all of your accounts. Since each account can create up to 20 bots with @BotFather, and Telegram's documentation does not mention any limits for the use of API ID and API hash, as also proved by developers including my own experiences. using one API ID and API hash for multiple bots poses no problem. The same applies to user accounts (CLI Bots)