Welcome to the Telegram API ID & Hash Bot! This is a Telegram bot designed to help developers and users easily obtain their Telegram API ID and API Hash securely through the official Telegram website. It also includes an admin broadcast feature for sending messages to all users. 🚀
- 📱 Fetch API Credentials: Users can provide their phone number to receive their Telegram API ID and API Hash.
- 🔒 Secure Process: No phone numbers are stored; the process is handled securely via Telegram's official API.
- 📢 Admin Broadcast: Admins can send messages to all registered users.
- ⏱ Rate Limiting: Prevents spam by limiting message frequency.
- 🌍 Persian Language Support: User-friendly messages in Persian for a better experience.
Follow these steps to set up and run the bot locally:
-
Clone the Repository:
git clone https://github.com/ItsReZNuM/idhashbot cd idhashbot -
Install Dependencies: Ensure you have Python 3.8+ installed. Then, install the required packages:
pip install -r requirements.txt
-
Set Up Environment:
- Replace the
BOT_TOKENinidhashbot.pywith your Telegram bot token obtained from @BotFather. - Update
ADMIN_USER_IDSinidhashbot.pywith the Telegram user ID(s) of the admin(s).
- Replace the
-
Run the Bot:
python idhashbot.py
- Start the bot by sending the
/startcommand. - Share your phone number (e.g.,
+989123456789) or use the "Share Contact" button. - Enter the verification code sent by Telegram.
- Receive your API ID, API Hash, Public Key, and Production Configuration! 🎉
- Admins can use the "Broadcast Message 📢" button to send messages to all users.
/start: Begins the process to fetch API credentials./cancel: Cancels the current process and resets the state.
- Broadcast Feature: Admins (defined in
ADMIN_USER_IDS) can send messages to all registered users using the "Broadcast Message 📢" button. - User Management: User data (ID and username) is stored in
users.jsonfor broadcast purposes.
The following Python packages are required:
pyTelegramBotAPI- For Telegram bot functionalityrequests- For HTTP requests to Telegram's APIbeautifulsoup4- For parsing HTML responsespytz- For handling time zones
See requirements.txt for details.
- Phone numbers are not stored locally; they are only used temporarily to communicate with Telegram's official API.
- Ensure your bot token and admin IDs are kept secure and not exposed in public repositories.
Contributions are welcome! 🙌 Feel free to submit issues or pull requests to improve the bot. Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature). - Commit your changes (
git commit -m 'Add your feature'). - Push to the branch (
git push origin feature/your-feature). - Open a pull request.
For questions or support, reach out via GitHub Issues or contact the maintainer on Telegram.
- Telegram Bot : @ReZIdHashBot
- Me: t.me/ItsReZNuM
Happy coding! 🚀