messages.sendEncrypted
Sends a text message to a secret chat.
Example
TL schema
Parameters
Name | Type | Description |
flags | Flags, see TL conditional fields | |
silent | Send encrypted message without a notification | |
peer | Secret chat ID | |
random_id | Unique client message ID, necessary to avoid message resending | |
data | TL-serialization of DecryptedMessage type, encrypted with a key that was created during chat initialization |
Result
Possible errors
Code | Type | Description |
400 | CHAT_ID_INVALID | The provided chat id is invalid |
400 | DATA_INVALID | Encrypted data invalid |
400 | ENCRYPTION_DECLINED | The secret chat was declined |
400 | MSG_WAIT_FAILED | A waiting call returned an error |
Can bots use this methd ?
yes
Related pages
Object describes the contents of an encrypted message.
Last updated