Skip to content

Incoming reaction message#

This section describes the format of the incoming notification messageData object for an incoming reaction message. For a description of the general format of incoming notifications, refer to the Incoming messages section.

To receive incoming notifications of this kind, two conditions must be met:

  • typeWebhook = incomingMessageReceived
  • messageData.typeMessage = reactionMessage

Instance settings

To receive incoming notifications about reaction messages, you need to enable the settings in one of the ways presented:

  1. Through the console, enable the Receive notifications about incoming messages and files setting

  2. Through the SetSettings method, enable the incomingWebhook setting

Notification#

Notification format#

Fields of the messageData object

Parameter Type Description
typeMessage string Type of the received message. For messages of this type the field takes the value: reactionMessage
extendedTextMessageData object Object with data about the received reaction message
quotedMessage object Object with data about the quoted message. The message the correspondent reacted to

Fields of the extendedTextMessageData object

Parameter Type Description
text string Reaction (emoji) to the message

Fields of the quotedMessage object

Parameter Type Description
stanzaId string id of the quoted message
participant string id of the sender of the quoted message

The remaining fields are filled in depending on the type of the quoted message and are identical to the fields of the incoming messages described in the Incoming messages section

Notification body example#

Example of a notification body for a message with a reaction from a personal chat#

{
  "typeWebhook": "incomingMessageReceived",
  "instanceData": {
    "idInstance": 4100000000,
    "wid": "79876543210@c.us",
    "typeInstance": "telegram"
  },
  "timestamp": 1705895506,
  "idMessage": "1763115112345",
  "senderData": {
    "chatId": "10000000",
    "chatType": "user",
    "sender": "10000000",
    "chatName": "Vasilisa the Wise",
    "senderName": "Vasilisa the Wise",
    "senderType": "user",
    "senderContactName": "Vasilisa the Wise",
    "senderPhoneNumber": 79998887766
  },
  "messageData": {
    "typeMessage": "reactionMessage",
    "extendedTextMessageData": {
      "text": "👍"
    },
    "quotedMessage": {
      "stanzaId": "115144403609924049",
      "participant": "10000001"
    }
  }
}

Example of a notification body for a message with a reaction from a group chat#

{
  "typeWebhook": "incomingMessageReceived",
  "instanceData": {
    "idInstance": 4100000000,
    "wid": "79876543210@c.us",
    "typeInstance": "telegram"
  },
  "timestamp": 1763115112,
  "idMessage": "1763115112345",
  "senderData": {
    "chatId": "-10000000000000",
    "chatType": "supergroup",
    "sender": "10000000",
    "chatName": "Faraway Kingdom",
    "senderName": "Vasilisa",
    "senderType": "user",
    "senderContactName": "",
    "senderPhoneNumber": 0
  },
  "messageData": {
    "typeMessage": "reactionMessage",
    "extendedTextMessageData": {
      "text": "👍"
    },
    "quotedMessage": {
      "stanzaId": "115144403609924049",
      "participant": "10000001"
    }
  }
}