-
Notifications
You must be signed in to change notification settings - Fork 11
String Session Generator
The String-Session-Generator allows the user to obtain a new String Session in combination with the user's App api_id
(API Key) and App api_hash
(API Hash) to allow HyperUBot to login into the user's account to interact as 'user'bot.
Besides String Sessions there are Memory Sessions and SQLite Sessions supported by Telethon. HyperUBot, however uses String Sessions as it contains necessary data only to authentificate the user account while establishing a connection to Telegram's server. By this, you don't need to re-login each time when starting the userbot.
Read more information about (String) Sessions here
In order to get a new String Session, you need to create a new Application or use an existing Application at My Telegram to obtain the App api_id
and App api_hash
:
- Login to My Telegram: https://my.telegram.org
- Go to
API development
tools and fill out the form - Get your
App api_id
andApp api_hash
like you see in the picture below
Note: These values are unique and you shouldn't share these with anyone else, as these values allow the person to login into your account
To get a new String Session, start the String-Session-Generator by locating to HyperUBot's directory and running the following command in terminal:
-
Docker: Run docker image/container then select
String-Session-Generator
-
POSIX systems:
python3 generate_session.py
(if it fails, try it by python version e.g.python3.8 generate_session.py
) -
Windows:
python generate_session.py
The String-Session-Generator will prompt you for the following information:
- Your
App api_id
andApp api_hash
- Your phone number to interact as userbot
- Your account's password, if the Two-factor authentication (2FA) is enabled
- Your verification code
If everything went fine, you should see a long string in your terminal (may be green colored). The String-Session-Generator will suggest you to store the generated string into a secured configuration to keep it safe from unauthorized access.
Warning: do not share the String Session with anyone else, as it grants the person who has it, full access to your account! If your string session got leaked, straight terminate that session!
HyperUBot - A customizable, modular Telegram userbot, with innovative components.
Copyright © 2020-2023 nunopenim & prototype74, licensed under PEL