GetTmpPasswordRequest
Only users can use this request. See code examples.
---functions--- account.getTmpPassword#449e0b51 password:InputCheckPasswordSRP period:int = account.TmpPassword
Returns
account.TmpPassword |
This type can only be an instance of:
TmpPassword |
Parameters
password | InputCheckPasswordSRP | |
period | int |
Known RPC errors
This request can cause 2 known errors:
PasswordHashInvalidError | The password (and thus its hash value) you entered is invalid. |
TmpPasswordDisabledError | The temporary password is disabled. |
You can import these from telethon.errors
.
Example
from telethon.sync import TelegramClient from telethon import functions, types with TelegramClient(name, api_id, api_hash) as client: result = client(functions.account.GetTmpPasswordRequest( password=types.InputCheckPasswordSRP( srp_id=-12398745604826, A=b'arbitrary\x7f data \xfa here', M1=b'arbitrary\x7f data \xfa here' ), period=42 )) print(result.stringify())