LonamiWebs / Telethon

Pure Python 3 MTProto API Telegram client library, for bots too!
https://docs.telethon.dev
MIT License
9.9k stars 1.4k forks source link

Logged out of account everywhere and can not regain access, simply by logging in using this library. #4102

Closed diimdeep closed 1 year ago

diimdeep commented 1 year ago

Code that causes the issue

from telethon import TelegramClient, events, sync

# These example values won't work. You must get your own api_id and
# api_hash from https://my.telegram.org, under API Development.
api_id = 
api_hash = 

client = TelegramClient('session_name', api_id, api_hash)
client.start()

Hello @Lonami

By simply logging into account by using this example code provided in the Readme, I have lost access to my personal account and was logged out everywhere and at the moment can not regain access to it.

Looks like you know about this possibility from numerous incidents https://github.com/LonamiWebs/Telethon/issues/4051 https://github.com/LonamiWebs/Telethon/issues/824

I urge you to put highly visible warning about very high possibility of losing access to account. Only briefly mentioning this in FAQ is simply not enough and does not provide adequate visibility for end users that could only read Readme and use provided example code.

Please put warning about this in:

I hope you understand my concern.

Update:

Lonami commented 1 year ago

Please put warning about this in:

  • Readme
  • In example files
  • In interactive routine start()

Damn that's kinda extreme, don't you think? "Go away, this library will just ban your account" is not good advertising.

I've added a reminder that breaking the ToS can lead to account bans. That really should be obvious to anyone using third-party services, though. But hopefully more people will be aware of this reality with that change.

very high possibility of losing access to account

I'm also not sure where this number is coming from. I've been using the library for years (hell, even developing it, and doing a lot of unintended things), and have never experienced it myself. Sure, a lot of people complain about bans. But we don't see people complaining about it working just fine. There is selection bias here.