Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import getpass
- from telethon.errors import SessionPasswordNeededError
- from telethon import TelegramClient, sync, errors
- api_id = ********* #+**********
- api_hash = '*****************************'
- #api_id = ********* #+*********
- #api_hash = ''*****************************''
- client = TelegramClient('my_account', api_id, api_hash)
- try:
- client.start(password="123456789")
- except Exception as e:
- print(e)
- client.run_until_disconnected()
Add Comment
Please, Sign In to add comment