messages.requestEncryption
Sends a request to start a secret chat to the user.
| 名前 | 型 | 必須 | 説明 |
|---|---|---|---|
user_id | InputUser | はい | ユーザーID |
random_id | int | はい | Unique client request ID required to prevent resending. This also doubles as the chat ID. See [here »](https://core.telegram.org/api/updates.md#updatemessageid-updates) for more info on random ID deduplication and updateMessageID mapping. |
g_a | bytes | はい | `A = g ^ a mod p`、[Wikipedia](https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange)] を参照 |
レスポンス
EncryptedChat
MTProto RPC
- 400 · DH_G_A_INVALID — g_a invalid.
- 400 · INPUT_USER_DEACTIVATED — The specified user was deleted.
- 400 · RANDOM_ID_DUPLICATE — You provided a random ID that was already used.
- 400 · USER_ID_INVALID — The provided user ID is invalid.
- 403 · USER_IS_BLOCKED — You were blocked by this user.