-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signed out of my account on all my devices #4051
Comments
Thinking Telethon is intentionally telling Telegram to ban its users would be silly. The library wouldn't be as used nearly as much if that was the case. You don't have to take my word for it though, if this is something you particularly care about, please by all means audit the library. To the best of my knowledge, Telethon doesn't do anything which would clearly direct to a ban. But maybe I'm wrong. Regardless, this is even explained in the FAQ - My account was deleted/limited when using the library (permalink). So it's not like I'm trying to hide it. Anyway, I'll be closing this as it's not really something actionable from my side (unless your audit brings up results). Telethon is unfortunately abused by many spammers, so it is very likely Telegram has learned to pick up on patterns to detect this library, and be more willing to hand out bans. See #824 for more resources. |
When i use any telethon-metod, this leads to the same results. Disconnect from all device. After launching the TelegramClient, only the first method of the code is triggered, then the account is disconnected... |
I tried with VPN and different accounts - same, any use of telethon disconnect from all device. I had to temporarily switch to another library, I hope this problem will be fixed |
pyrogram...it works without failures and problems. |
The most likely unfortunate reason is that Telethon has been abused by many spammers in the past, and so Telegram has learnt some way to detect Telethon, and is more likely to ban or restrict accounts. I really don't think there's anything that can be done. Even if it was somehow "fixed", the library would be abused yet again and lead to the same problems. |
May be need change "user-agent" string with name Telethon-library? )) |
You can try to configure the parameters used to initialize the connection in the |
The same happened yesterday, so I've subscribed to this issue. I'm trying to use Telethon to automate backups my own scheduled messages - there is no "Export chat history" button for scheduled messages yet, so I ended up using my own script on top of Telethon. Life would be more easier if Telegram devs add "claims" to App configuration, besides api_id, app_hash and titles, like: "messages:read-only:me" - which will indicate that app is only supposed to read owner's messages, no more - so definitely it is not for spam. Thanks for the library, anyway. |
I appreciate the kind words and sympathize with those affected. It really sucks when your library essentially can't be used because Telegram decided so. With that said, I'd like to point out, this problem is not exclusive to Telethon, as demonstrated by https://github.com/pyrogram/pyrogram/issues/1236. |
However, a solution to this problem has been found. Who is interested - ask me. Solution absolutely not obvious... |
This is a good time to remind everyone experiencing this issue to be wary of scams and people trying to sell solutions. The decision is always on Telegram. I'm sure people will find a way to delay this error. But do think twice before buying solutions. |
So what's the solution? |
You need to run the client with the following parameters - client = TelegramClient('my_session', api_id, api_hash, system_version="4.16.30-vxCUSTOM") Let the author of the Telethon-library tell us why it works... |
As mentioned @Belousov-Aleksandr , the problem is setting up your client headers, but Solution: Log in Telegram official client on your desktop, enable debug mode, collect some logs (write a message), and check the following parameters:
Make sure you have the same settings when instantiating |
Woah, I've come to face the same issue just yesterday. It didn't happen to be in my older Telethon version that I installed like, maybe, this January. Then my server got hacked (who the hell would need to do that anyway? Nothing much of value) and I had to reinstall everything. Once I did and tried to run my app, it backfired and I was logged out of all of my devices. @a-bashtannik how exactly do you enable debug mode and collect all the info? |
Type 'debugmode' in the settings page of Telegram desktop and confirm it. |
The solutions seem more like a hack. Were there any progress to present this from the devs? This behavior defenitely should not be happening ... |
I faced the same problem, is it a hack on the part of this application or not? |
I didn't find debugmode in the settings,Where can I find him |
Hi All! If use parameter system_version (by example: system_version="1.01") all work fine. As wrote @Belousov-Aleksandr. |
Can you provide api_id, api_hash, app_version, and other configuration information? |
API ID and hash are private. You're expected to use your own, not someone else's, at the risk of being banned. |
This is my device information,AUTH_KEY_UNREGISTERED error still occurs,How can I adjust to avoid the AUTH_KEY_UNREGISTERED error? |
That does not work. Telegram will still log you out. |
This did solve the problem for me! No need to go to debug mode and sync headers, etc... |
when i was running local it didn't log out but when i try run on server sign me out every platform i have |
I have same probelms i have used random versions, divace model, eveyrthing is random and api_id and api_hash i have try to create first on pyrogram then convert to telethon but result is same but it going stll log out all the latest version @Lonami please help me 🙏 |
I'm a developer using pyrogram & telethon. My clients have recently reported a surge of similar issues, despite no relevant changes in my program code. This indicates that Telegram is tightening control over its third-party APIs, and it is highly likely that this will eventually render a significant number of third-party access methods unusable. |
Checklist
pip install -U https://github.com/LonamiWebs/Telethon/archive/v1.zip
and triggered the bug in the latest version.Code that causes the issue
I ran this code three times and each time it logged out all my devices from my phone, computer and telethon session. As a result, I was given a ban for 24 HOURS in any attempt to enter my telegram account. Thanks a lot. I will be without work and communication for a day....
The text was updated successfully, but these errors were encountered: