Incoming sticker message#
This section describes messageData
object incoming webhook format for incoming sticker message. For a description of the general format of incoming webhooks, refer to Incoming messages section.
To get incoming webhooks of this type, two conditions must be true:
typeWebhook
= incomingMessageReceived
messageData.typeMessage
= stickerMessage
Configuring an instance
To receive incoming notifications about sticker messages, you need to enable the settings using one of the following options:
-
Through console enable the setting
Get notifications about incoming messages and files
-
Through the SetSettings method enable the setting
incomingWebhook
Webhook#
Webhook parameters#
messageData
object parameters
Parameter | Type | Description |
---|---|---|
typeMessage | string | Incoming message type. For messages of this type the parameter takes on the value: stickerMessage |
fileMessageData | object | Incoming sticker data object |
quotedMessage | object | Quoted message data object |
fileMessageData
object parameters
Parameter | Type | Description |
---|---|---|
downloadUrl | string | Sticker url |
caption | string | File caption |
fileName | string | File name |
jpegThumbnail | string | Image preview in base64 |
isAnimated | boolean | Whether the sticker is animated |
mimeType | string | File type according to the Media Types classification |
isForwarded | boolean | Whether the message is forwarded, takes on values true/false |
forwardingScore | integer | Number of message forwards |
quotedMessage
object parameters
Parameter | Type | Description |
---|---|---|
stanzaId | string | quoted message id |
participant | string | quoted message sender's id |
typeMessage | string | quoted message type |
The rest of the fields are filled depending on the type of the quoted message and are identical to the fields of incoming messages described in Incoming messages section
Webhook body example#
{
"typeWebhook": "incomingMessageReceived",
"instanceData": {
"idInstance": 1234,
"wid": "11001234567@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1588091580,
"idMessage": "F7AEC1B7086ECDC7E6E45923F5EDB825",
"senderData": {
"chatId": "79001234568@c.us",
"chatName": "John",
"sender": "79001234568@c.us",
"senderName": "John",
"senderContactName": "John Doe"
},
"messageData": {
"typeMessage": "stickerMessage",
"fileMessageData": {
"downloadUrl": "https://sw-media.storage.greenapi.net/9901742665/607dde0a-01dc-4dd9-8afb-707cbf610943.webp",
"caption": "",
"fileName": "201ee6e7-b6f9-48fe-bc5a-1ce4341cce88.webp",
"jpegThumbnail": "",
"isAnimated": true,
"mimeType": "image/webp",
"forwardingScore": 1,
"isForwarded": true
},
"quotedMessage": {
"stanzaId": "46618B98B3B9DF50F123456789123456",
"participant": "79001234568@c.us"
}
}
}
Sticker message from group chat webhook body example#
{
"typeWebhook": "incomingMessageReceived",
"instanceData": {
"idInstance": 1234,
"wid": "11001234567@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1732268220,
"idMessage": "2D9D6721A977D369246509EBE0CE44CA",
"senderData": {
"chatId": "120363369140947676@g.us",
"chatName": "Group",
"sender": "79001234568@c.us",
"senderName": "John",
"senderContactName": "John Doe"
},
"messageData": {
"typeMessage": "stickerMessage",
"fileMessageData": {
"downloadUrl": "https://sw-media.storage.greenapi.net/9901742665/607dde0a-01dc-4dd9-8afb-707cbf610943.webp",
"caption": "",
"fileName": "201ee6e7-b6f9-48fe-bc5a-1ce4341cce88.webp",
"jpegThumbnail": "",
"isAnimated": true,
"mimeType": "image/webp",
"forwardingScore": 1,
"isForwarded": true
},
"quotedMessage": {
"stanzaId": "46618B98B3B9DF50F123456789123456",
"participant": "79001234568@c.us"
}
}
}