ReqDHParamsRequest
Both users and bots may be able to use this request. See code examples.
---functions--- req_DH_params#d712e4be nonce:int128 server_nonce:int128 p:bytes q:bytes public_key_fingerprint:long encrypted_data:bytes = Server_DH_Params
Returns
| Server_DH_Params |
This type can be an instance of either:
| ServerDHParamsFail | ServerDHParamsOk |
Parameters
| nonce | int128 | |
| server_nonce | int128 | |
| p | bytes | |
| q | bytes | |
| public_key_fingerprint | long | |
| 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.ReqDHParamsRequest(
nonce=int.from_bytes(os.urandom(16), 'big'),
server_nonce=int.from_bytes(os.urandom(16), 'big'),
p=b'arbitrary\x7f data \xfa here',
q=b'arbitrary\x7f data \xfa here',
public_key_fingerprint=-12398745604826,
encrypted_data=b'arbitrary\x7f data \xfa here'
))
print(result.stringify())