Session String Creator Userbot is a Python-based tool designed to securely generate and export session strings for Telegram user accounts. This tool simplifies the process of creating session strings, essential for running bots or automating tasks using the Telegram API.
- Secure Session Generation: Seamlessly generate session strings for user accounts without requiring persistent storage.
- Easy Configuration: Utilizes environment variables for quick setup and secure configuration.
- Interactive Input: Prompts users for necessary inputs like API credentials and phone number during execution.
- Error Handling: Provides robust error management to handle authentication and connection issues gracefully.
- Python 3.7+: Ensure you have Python installed on your machine. You can download it from python.org.
- Telegram API Credentials: Obtain API credentials (API ID, API HASH, and phone number) from Telegram's website.
Clone the repository to your local machine:
git clone https://github.com/xectrone/session-string-creator-telegram-userbot.git
cd session-string-creator-telegram-userbot
Install the required Python dependencies using pip:
pip install -r requirements.txt
Create a .env
file in the root directory and add the following environment variables:
API_ID=your_api_id
API_HASH=your_api_hash
PHONE_NUMBER=your_phone_number
Start the userbot by running:
python main.py
- Run the Script: Execute the script using the command
python main.py
. - Input Credentials: If not already set in the
.env
file, you will be prompted to enter your API ID, API Hash, and phone number. - Verification: A code will be sent to your Telegram account. Enter this code when prompted.
- Receive Session String: Once authenticated, the script will generate and display the session string. Copy this string for use in your bot or application.
Contributions are welcome! If you have suggestions or want to contribute improvements, please fork the repository and submit a pull request. Feel free to open issues for any bugs or feature requests.
This project is licensed under the MIT License. See the LICENSE file for more details.