SetClientDHParamsRequest
Both users and bots may be able to use this method. See code examples.
---functions--- set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:bytes = Set_client_DH_params_answer
Returns
| Set_client_DH_params_answer |
This type can be an instance of either:
| DhGenFail | DhGenOk |
| DhGenRetry |
Parameters
| nonce | int128 | |
| server_nonce | int128 | |
| encrypted_data | bytes |
Known RPC errors
This request can't cause any RPC error as far as we know.
Example
from telethon.sync import TelegramClient
from telethon import functions, types
with TelegramClient(name, api_id, api_hash) as client:
result = client(functions.SetClientDHParamsRequest(
nonce=int.from_bytes(os.urandom(16), 'big'),
server_nonce=int.from_bytes(os.urandom(16), 'big'),
encrypted_data=b'arbitrary\x7f data \xfa here'
))
print(result.stringify())