Incoming text message#
This section describes messageData
object incoming webhook format for incoming text 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
= textMessage
Webhook#
Webhook parameters#
messageData
object parameters
Parameter | Type | Descriptionе |
---|---|---|
typeMessage | string | Received message type. For messages of this type, the parameter takes on the value textMessage |
textMessageData | object | Text message data object |
textMessageData
object parameters
Parameter | type | Description |
---|---|---|
textMessage | string | Text message |
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",
"sender": "79001234568@c.us",
"chatName": "GreenWaba",
"senderName": "GreenWaba",
"senderContactName": "GreenWaba"
},
"messageData": {
"typeMessage": "textMessage",
"textMessageData": {
"textMessage": "I use GreenWaba to send this message to you!"
}
}
}
Webhook body example with error SWE001#
{
"typeWebhook": "incomingMessageReceived",
"instanceData":
{
"idInstance":1100000001,
"wid":"79000000000@c.us",
"typeInstance":"whatsapp"
},
"timestamp":1700545580,
"idMessage":"3AE2864C77312000000",
"senderData":
{
"chatId":"79000000001@c.us",
"chatName":"GreenWaba",
"sender":"79000000001@c.us",
"senderName":"GreenWaba"
},
"messageData":
{
"typeMessage":"textMessage",
"textMessageData":
{
"textMessage":"{{SWE001}}"
}
}
}