Layer 220
method Users
messages.acceptEncryption#3dbc0415 peer:InputEncryptedChat g_b:bytes key_fingerprint:long = EncryptedChat;

Parameters

Name Type Description
Peer InputEncryptedChat Secret chat ID
GB bytes B = g ^ b mod p, see Wikipedia
KeyFingerprint long 64-bit fingerprint of the received key

Returns

EncryptedChat

Possible Errors

Code Type Description
400 CHAT_ID_INVALID The provided chat id is invalid.
400 ENCRYPTION_ALREADY_ACCEPTED Secret chat already accepted.
400 ENCRYPTION_ALREADY_DECLINED The secret chat was already declined.

Gogram Example

// MessagesAcceptEncryption - positional arguments
result, err := client.MessagesAcceptEncryption(&tg.InputEncryptedChat{}, []byte{}, int64(0))
if err != nil {
    // handle error
}
// result is *tg.EncryptedChat