accept_encryption()

async Client.accept_encryption()

Accept an incoming end-to-end encrypted chat request.

Usable by Users Bots
Parameters:
  • peer (InputEncryptedChat) – The encrypted chat to accept.

  • g_b (bytes) – The Diffie-Hellman public key from the other party.

  • key_fingerprint (int) – Fingerprint of the shared key.

Returns:

EncryptedChat – The accepted encrypted chat.

Example

chat = await app.accept_encryption(peer, g_b=b"...", key_fingerprint=123)