Created
August 2, 2025 15:24
-
-
Save femdiya/eb8019bd2524cb078cc2593b33460614 to your computer and use it in GitHub Desktop.
Telethon script to delete user's account.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from telethon.sync import TelegramClient | |
| from telethon.tl.functions.account import DeleteAccountRequest | |
| api_id = 123456 # Replace with your API ID. | |
| api_hash = 'xxxxxx' # Replace with your API Hash. | |
| with TelegramClient('delete_me', api_id, api_hash) as client: | |
| try: | |
| client(DeleteAccountRequest( | |
| reason='User requested account deletion' | |
| )) | |
| print("Account deletion requested successfully.") | |
| except Exception as e: | |
| print(f"Error: {e}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment