BindTempAuthKeyRequest
Both users and bots can use this request. See code examples.
---functions--- auth.bindTempAuthKey#cdd42a05 perm_auth_key_id:long nonce:long expires_at:date encrypted_message:bytes = Bool
Returns
Bool |
This type has no instances available.
Parameters
perm_auth_key_id | long | |
nonce | long | |
expires_at | date | |
encrypted_message | bytes |
Known RPC errors
This request can cause 4 known errors:
EncryptedMessageInvalidError | Encrypted message invalid. |
InputRequestTooLongError | The input request was too long. This may be a bug in the library as it can occur when serializing more bytes than it should (like appending the vector constructor code at the end of a message). |
TempAuthKeyEmptyError | No temporary auth key provided. |
TimeoutError | A timeout occurred while fetching data from the worker. |
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.auth.BindTempAuthKeyRequest( perm_auth_key_id=-12398745604826, nonce=-12398745604826, expires_at=datetime.timedelta(minutes=5), encrypted_message=b'arbitrary\x7f data \xfa here' )) print(result)