messages.SendEncryptedService

class pyrogram.raw.functions.messages.SendEncryptedService

Sends a service message to a secret chat.

Details:
  • Layer: 223

  • ID: 32D439A4

Parameters:
  • peer (InputEncryptedChat) – Secret chat ID

  • random_id (int 64-bit) – Unique client message ID required to prevent message resending

  • data (bytes) – TL-serialization of DecryptedMessage type, encrypted with a key generated during chat initialization

Returns:

messages.SentEncryptedMessage

TL Schema

messages.sendEncryptedService#32d439a4
peer:InputEncryptedChat
random_id:long
data:bytes

= messages.SentEncryptedMessage

Parameter Tree

SendEncryptedService
├── peerInputEncryptedChat
│ └── InputEncryptedChat
│ ├── chat_idint
│ └── access_hashlong
├── random_idlong
└── databytes

Example

await app.invoke(
    SendEncryptedService(
        peer=InputEncryptedChat(
            chat_id=0,
            access_hash=0
        ),
        random_id=app.rnd_id(),
        data=b"data",
    )
)