Incoming contacts array message#
This section describes messageData
object incoming webhook format for incoming contacts array 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
= contactsArrayMessage
Configuring an instance
To receive incoming notifications about contacts array 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 contactsArrayMessage |
contacts | object | Incoming contact data object. |
quotedMessage | object | Quoted message data object. Present only if the message itself is a quote |
isForwarded | boolean | Whether the message is forwarded, takes on values true/false |
forwardingScore | integer | Number of message forwards |
contacts
object parameters
Parameter | Type | Description |
---|---|---|
displayName | string | Displayed contact name |
vcard | string | СVCard structure (contact visit card) |
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": 1683145380,
"idMessage": "9AF4BAC8AA780DD588B0655C247F822D",
"senderData": {
"chatId": "79001234568@c.us",
"chatName": "John",
"sender": "79001234568@c.us",
"senderName": "John",
"senderContactName": "John Doe"
},
"messageData": {
"typeMessage": "contactsArrayMessage",
"messageData": {
"contacts": [
{
"displayName": "Viktor Andreevich",
"vcard": "BEGIN:VCARD\nVERSION:3.0\nN:Andreevich;Viktor;;;\nFN:Viktor Andreevich\nitem1.TEL;waid=79001234567:+7 900 123-45-67\nitem1.X-ABLabel:Мобильный\nEND:VCARD"
},
{
"displayName": "Oleg Edrosovich",
"vcard": "BEGIN:VCARD\nVERSION:3.0\nN:Edrosovich;Oleg;;;\nFN:Oleg Edrosovich\nitem1.TEL;waid=79001234567:+7 900 123-45-67\nitem1.X-ABLabel:Мобильный\nEND:VCARD"
}
],
"forwardingScore": 0,
"isForwarded": false
}
}
}
Contacts array 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": "contactsArrayMessage",
"messageData": {
"contacts": [
{
"displayName": "Viktor Andreevich",
"vcard": "BEGIN:VCARD\nVERSION:3.0\nN:Andreevich;Viktor;;;\nFN:Viktor Andreevich\nitem1.TEL;waid=79001234567:+7 900 123-45-67\nitem1.X-ABLabel:Мобильный\nEND:VCARD"
},
{
"displayName": "Oleg Edrosovich",
"vcard": "BEGIN:VCARD\nVERSION:3.0\nN:Edrosovich;Oleg;;;\nFN:Oleg Edrosovich\nitem1.TEL;waid=79001234567:+7 900 123-45-67\nitem1.X-ABLabel:Мобильный\nEND:VCARD"
}
],
"forwardingScore": 0,
"isForwarded": false
}
}
}
Contacts array and text message quote incoming message webhook body example#
{
"typeWebhook": "incomingMessageReceived",
"instanceData": {
"idInstance": 1234,
"wid": "11001234567@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1683145380,
"idMessage": "9AF4BAC8AA780DD588B0655C247F822D",
"senderData": {
"chatId": "79001234568@c.us",
"chatName": "John",
"sender": "79001234568@c.us",
"senderName": "John",
"senderContactName": "John Doe"
},
"messageData": {
"typeMessage": "contactsArrayMessage",
"messageData": {
"contacts": [
{
"displayName": "Viktor Andreevich",
"vcard": "BEGIN:VCARD\nVERSION:3.0\nN:Andreevich;Viktor;;;\nFN:Viktor Andreevich\nitem1.TEL;waid=79001234567:+7 900 123-45-67\nitem1.X-ABLabel:Мобильный\nEND:VCARD"
},
{
"displayName": "Oleg Edrosovich",
"vcard": "BEGIN:VCARD\nVERSION:3.0\nN:Edrosovich;Oleg;;;\nFN:Oleg Edrosovich\nitem1.TEL;waid=79001234567:+7 900 123-45-67\nitem1.X-ABLabel:Мобильный\nEND:VCARD"
}
],
"forwardingScore": 0,
"isForwarded": false
},
"quotedMessage": {
"stanzaId": "3AA3BE1C2DFB5BBCC315",
"participant": "79001234567@c.us",
"typeMessage": "textMessage",
"textMessage": "Текст"
}
}
}
Contacts array and audio/video/document quote incoming message webhook body example#
{
"typeWebhook": "incomingMessageReceived",
"instanceData": {
"idInstance": 1234,
"wid": "11001234567@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1683145380,
"idMessage": "9AF4BAC8AA780DD588B0655C247F822D",
"senderData": {
"chatId": "79001234568@c.us",
"chatName": "John",
"sender": "79001234568@c.us",
"senderName": "John",
"senderContactName": "John Doe"
},
"messageData": {
"typeMessage": "contactsArrayMessage",
"messageData": {
"contacts": [
{
"displayName": "Viktor Andreevich",
"vcard": "BEGIN:VCARD\nVERSION:3.0\nN:Andreevich;Viktor;;;\nFN:Viktor Andreevich\nitem1.TEL;waid=79001234567:+7 900 123-45-67\nitem1.X-ABLabel:Мобильный\nEND:VCARD"
},
{
"displayName": "Oleg Edrosovich",
"vcard": "BEGIN:VCARD\nVERSION:3.0\nN:Edrosovich;Oleg;;;\nFN:Oleg Edrosovich\nitem1.TEL;waid=79001234567:+7 900 123-45-67\nitem1.X-ABLabel:Мобильный\nEND:VCARD"
}
],
"forwardingScore": 0,
"isForwarded": false
},s
"quotedMessage": {
"stanzaId": "5E956DF0AC8ED6873FEF",
"participant": "79001234567@c.us",
"typeMessage": "imageMessage",
"downloadUrl": "",
"caption": "",
"fileName": "",
"jpegThumbnail": "/9j/4AAQSkZJRgA"
}
}
}
Contacts array and contact quote incoming message webhook body example#
{
"typeWebhook": "incomingMessageReceived",
"instanceData": {
"idInstance": 1234,
"wid": "11001234567@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1683145380,
"idMessage": "9AF4BAC8AA780DD588B0655C247F822D",
"senderData": {
"chatId": "79001234568@c.us",
"chatName": "John",
"sender": "79001234568@c.us",
"senderName": "John",
"senderContactName": "John Doe"
},
"messageData": {
"typeMessage": "contactsArrayMessage",
"messageData": {
"contacts": [
{
"displayName": "Viktor Andreevich",
"vcard": "BEGIN:VCARD\nVERSION:3.0\nN:Andreevich;Viktor;;;\nFN:Viktor Andreevich\nitem1.TEL;waid=79001234567:+7 900 123-45-67\nitem1.X-ABLabel:Мобильный\nEND:VCARD"
},
{
"displayName": "Oleg Edrosovich",
"vcard": "BEGIN:VCARD\nVERSION:3.0\nN:Edrosovich;Oleg;;;\nFN:Oleg Edrosovich\nitem1.TEL;waid=79001234567:+7 900 123-45-67\nitem1.X-ABLabel:Мобильный\nEND:VCARD"
}
],
"forwardingScore": 0,
"isForwarded": false
},
"quotedMessage": {
"stanzaId": "3AC28E97DA5CA6A31723",
"participant": "79001234567@c.us",
"typeMessage": "contactMessage",
"contact": {
"displayName": "Green-API",
"vcard": "BEGIN:VCARD\nVERSION:3.0\nN:;И;;;\nFN:Green-API\nX-WA-BIZ-NAME:\nX-WA-BIZ-DESCRIPTION:\nTEL;type=CELL;type=VOICE;waid=79580000000:+7 958 000-00-00\nEND:VCARD"
}
}
}
}
Contacts array and location quote incoming message webhook body example#
{
"typeWebhook": "incomingMessageReceived",
"instanceData": {
"idInstance": 1234,
"wid": "11001234567@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1683145380,
"idMessage": "9AF4BAC8AA780DD588B0655C247F822D",
"senderData": {
"chatId": "79001234568@c.us",
"chatName": "John",
"sender": "79001234568@c.us",
"senderName": "John",
"senderContactName": "John Doe"
},
"messageData": {
"typeMessage": "contactsArrayMessage",
"messageData": {
"contacts": [
{
"displayName": "Viktor Andreevich",
"vcard": "BEGIN:VCARD\nVERSION:3.0\nN:Andreevich;Viktor;;;\nFN:Viktor Andreevich\nitem1.TEL;waid=79001234567:+7 900 123-45-67\nitem1.X-ABLabel:Мобильный\nEND:VCARD"
},
{
"displayName": "Oleg Edrosovich",
"vcard": "BEGIN:VCARD\nVERSION:3.0\nN:Edrosovich;Oleg;;;\nFN:Oleg Edrosovich\nitem1.TEL;waid=79001234567:+7 900 123-45-67\nitem1.X-ABLabel:Мобильный\nEND:VCARD"
}
],
"forwardingScore": 0,
"isForwarded": false
},
"quotedMessage": {
"stanzaId": "3A5473EE888EEE52BC20",
"participant": "79001234567@c.us",
"typeMessage": "locationMessage",
"location": {
"nameLocation": "place",
"address": "",
"jpegThumbnail": "",
"latitude": 52.58900290649414,
"longitude": 39.659369010253906
}
}
}
}