Mention SessionPasswordNeeded

Lonami 2017-10-19 14:05:42 +02:00
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!