mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-14 10:02:25 +03:00
Mention SessionPasswordNeeded
parent
8536a7e5a4
commit
f7bb5d3cb3
|
@ -36,6 +36,8 @@ If you're not authorized, you need to `.sign_in()`:
|
|||
client.send_code_request(phone_number)
|
||||
myself = client.sign_in(phone_number, input('Enter code: '))
|
||||
# If .sign_in raises PhoneNumberUnoccupiedError, use .sign_up instead
|
||||
# If .sign_in raises SessionPasswordNeeded error, call .sign_in(password=...)
|
||||
# You can import both exceptions from telethon.errors.
|
||||
```
|
||||
|
||||
`myself` is your Telegram user. You can view all the information about yourself by doing `print(myself.stringify())`. You're now ready to use the `client` as you wish!
|
Loading…
Reference in New Issue
Block a user