Sends a request to start a secret chat to the user.
encryptedChatEmpty#ab7ec0a0 id:int = EncryptedChat;
encryptedChatWaiting#3bf703dc id:int access_hash:long date:int admin_id:int participant_id:int = EncryptedChat;
encryptedChatRequested#fda9a7b7 id:int access_hash:long date:int admin_id:int participant_id:int g_a:bytes nonce:bytes = EncryptedChat;
encryptedChat#6601d14f id:int access_hash:long date:int admin_id:int participant_id:int g_a_or_b:bytes nonce:bytes key_fingerprint:long = EncryptedChat;
encryptedChatDiscarded#13d6dd27 id:int = EncryptedChat;
---functions---
messages.requestEncryption#f64daf43 user_id:InputUser random_id:int g_a:bytes = EncryptedChat;
Parameters
Name |
Type |
Description |
user_id |
InputUser |
User ID |
random_id |
int |
Unique client request ID required to prevent resending. This also doubles as the chat ID. |
g_a |
bytes |
A = g ^ a mod p , see Wikipedia |
Result
EncryptedChat
Possible errors
Code |
Type |
Description |
400 |
DH_G_A_INVALID |
g_a invalid. |
400 |
INPUT_USER_DEACTIVATED |
The specified user was deleted. |
400 |
USER_ID_INVALID |
The provided user ID is invalid. |