messages.sendEncryptedFile

Sends a message with a file attachment to a secret chat

messages.sentEncryptedMessage#560f8935 date:int = messages.SentEncryptedMessage;
messages.sentEncryptedFile#9493ff32 date:int file:EncryptedFile = messages.SentEncryptedMessage;
---functions---
messages.sendEncryptedFile#9a901b66 peer:InputEncryptedChat random_id:long data:bytes file:InputEncryptedFile = messages.SentEncryptedMessage;

Parameters

Name Type Description
peer InputEncryptedChat Secret chat ID
random_id long Unique client message ID necessary to prevent message resending
data bytes TL-serialization of DecryptedMessage type, encrypted with a key generated during chat initialization
file InputEncryptedFile File attachment for the secret chat

Result

messages.SentEncryptedMessage

Possible errors

Code Type Description
400 BOT_METHOD_INVALID This method can't be used by a bot
400 MSG_WAIT_FAILED A waiting call returned an error

Related pages

DecryptedMessage

Object describes the contents of an encrypted message.