TelegramQueryIDFetcher is a powerful and easy-to-use tool for retrieving query_id
from Telegram bots. This project uses the Pyrogram library to interact with the Telegram API and obtains the required data through WebView requests.
- 🚀 Create and manage Telegram sessions
- 🔍 Retrieve
query_id
from specified Telegram bots - 💾 Save retrieved
query_id
to files - 🤖 Support for multiple bots and multiple sessions
- 🌐 Proxy support for enhanced accessibility
Before you begin, ensure you have met the following requirements:
- Python 3.7+
-
Clone the repository:
git clone https://github.com/YourUsername/TelegramQueryIDFetcher.git cd TelegramQueryIDFetcher
-
Install dependencies:
pip install -r requirements.txt
-
Set up your configuration:
cp .env-example .env
- Obtain
API_ID
andAPI_HASH
from my.telegram.org - Or reply with "API" in our Telegram group for public API credentials
- Edit the
.env
file and fill in yourAPI_ID
andAPI_HASH
-
Run the script:
python auto_get_token.py
For proxy support:
python auto_get_token_proxy.py
-
Choose the appropriate action:
- Create a session: Enter your phone number and session name
- Use existing sessions: Copy session files from other scripts' sessions folder to this script's sessions folder
- Select a bot to retrieve query_id: Choose a bot and batch retrieve query_ids
-
Automatic query_id saving:
- All query_ids are automatically saved: in
botusername_token.txt
files
- All query_ids are automatically saved: in
When using auto_get_token_proxy.py
, the script will use proxies from the proxy.txt
file. If the number of proxies is less than the number of sessions, proxies will be reused.