尽管代码正确,但 Telegram 登录仍被阻止 - Python Telethon

问题描述 投票:0回答:2

我正在开发一个使用 Telethon 连接到 Telegram 的 Python 项目。我有以下身份验证代码:

client = TelegramClient(phone, api_id, api_hash, flood_sleep_threshold=3)
client.connect()
if not client.is_user_authorized():
    client.send_code_request(phone)
    client.sign_in(phone, input(f'Enter the code: {phone} : '))

我面临的问题是,即使我输入正确的代码,Telegram 也会阻止我的登录尝试,并显示以下消息:

Telegram blocked an attempt to log in to your account from a new device on 23/10/2023 20:48:02 UTC.

Device: chatbot, 1.31.0, PC 64bit, Android, 4.18.0
Location: Germany (IP = .......)

No one could access your chats because the login was not completed. The code was entered correctly, but login was not allowed because this code was previously shared by your account.

有人遇到过类似的问题或者可以提供有关为什么会发生这种情况的见解吗?我确信代码是正确的,但我的帐户似乎受到某种限制或阻止。如何解决此问题并使用 Telethon 成功登录?

python telegram telethon
2个回答
0
投票

您检查设备是否启用了远程控制(如 teamviewer)。只要靠近就可以了。


0
投票

你能解决这个问题吗,我一直无法解决

© www.soinside.com 2019 - 2024. All rights reserved.