Created
January 9, 2020 22:00
-
-
Save Aero-Blue/5f053b49b3a94a4c0faefe73070f0dd5 to your computer and use it in GitHub Desktop.
Simple Telegram login example
This file contains 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 # Imports | |
API_ID = 123456 | |
API_HASH = "cje94230424jlesaferj23432042cc" | |
PHONE_NUMBER = "+12345678900" | |
with TelegramClient(PHONE_NUMBER, API_ID, API_HASH) as client: | |
account = client.get_me() # All your account info | |
print(f"Logged in as {account.username}!") # Output to console |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment