good afternoon. Tell me please. I have a paid account. I run the code first time, but I get an error:
2025-01-14 06:49:55.625 - Connecting to 149.154.167.51:443/TcpFull...
2025-01-14 06:49:57.161 - Connecting to 149.154.167.51:443/TcpFull complete!
Please enter your phone (or bot token): +**********
Please enter the code you received: *****
Signed in successfully as ᅠ ᅠ; remember to not break the ToS or you will risk an account ban!
2025-01-14 06:50:46.018 - The client is successfully connected using the session file.
2025-01-14 06:50:46.018 - It's all set! We are waiting for 5 seconds...
2025-01-14 06:50:49,523 - Cannot get difference since the account is not logged in: AuthKeyUnregisteredError
2025-01-14 06:50:51.020 - Checking messages from the general list of channels.
2025-01-14 06:50:51,020 - Channel verification: @naimuvol
2025-01-14 06:50:51,718 - Common Telethon error for @naimuvol channel: The key is not registered in the system (caused by ResolveUsernameRequest)
This is how i try to connect:
config_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'config.json')
session_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'session_name.session')
with open(config_path, 'r', encoding='utf-8') as f:
config = json.load(f)
api_id = config['api_id']
api_hash = config['api_hash']
client = TelegramClient(session_path, api_id, api_hash)
The file session_name.session
is created. at the same time, my
telegram logs out even on my phone and then it is very difficult to
restore access. What could be the problem and how to solve it? Thank
you.
[formatted by admin]