AuthKeyUnregisteredError
I wrote my userbot on Teleton, everything was fine until I uploaded it to another hosting (in Germany) and clicked to end the session on the old hosting (in Helsinki). Every time I try to run the bot on a host or on a local machine, I get this error. this happens every time, and when this error occurs, it automatically terminates all sessions with the userbot
我在Teleton上写了我的userbot,一切都很好,直到我把它上传到另一个主机(在德国),并点击结束旧主机(在赫尔辛基)的会话。每次我尝试在主机或本地机器上运行bot时,都会收到此错误。每次都会发生这种情况,当发生此错误时,它会自动终止与userbot的所有会话
I launch the bot, enter the code that telegram sended to me, everything is good, and after some time (2-5 minutes, always different), when the bot needs to process some action, it gives this error
2023-09-09 19:48:14,685 - telethon.client.updates - INFO - Cannot get difference since the account is not logged in: AuthKeyUnregisteredError
(but it was logged in)
我启动机器人,输入电报发送给我的代码,一切都很好,一段时间(2-5分钟,总是不同),当机器人需要处理一些操作时,它给出了这个错误2023-09-09 19:48:14,685-telethon.client.更新-信息-无法获得差异,因为帐户没有登录:AuthKeyUnRegisteredError(但它已登录)
I try to delete old sessions databases and rename it on
我尝试删除旧会话数据库并将其重命名为
client = TelegramClient('anon', api_id, api_hash)
to
至
client = TelegramClient('userbot', api_id, api_hash)
i tried this like 10 times
我试了10次了
Please help, if someone had that problem or knows how to fix it, let me know
请帮忙,如果有人有这个问题或知道如何解决它,让我知道
更多回答
AuthKeyUnregisteredError
means you need to login again. Telegram can also terminate sessions if it detects suspicious activity. What this means is up to them.
AuthKeyUnRegisteredError表示您需要重新登录。如果检测到可疑活动,Telegram还可以终止会话。这意味着什么取决于他们。
我是一名优秀的程序员,十分优秀!