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' |
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 import TelegramClient | |
from telethon.tl.types import PeerChannel | |
import asyncio | |
api_id = xxxxxx # Replace with your API ID. | |
api_hash = 'your_api_hash' # Replace with your API Hash. | |
getting_entity_ID = 'publicgroupusername/publicchannelusername' # No @ symbol, enter username only. | |
client = TelegramClient('session_name', api_id, api_hash) |