Message sent from phone#
The format of a message sent fromphone is identical to outgoing message format, while incoming webhook type takes on the value outgoingMessageReceived.
Configuring an instance
To receive incoming notifications about messages sent from the phone, you need to enable the settings using one of the following options:
-
Through console enable the settings
Receive notifications about messages sent from the phone(optionalReceive notifications about outgoing messages statusesto receive notifications about the statuses of the sent message). -
Through the SetSettings method enable the settings
outgoingMessageWebhook(optionaloutgoing Webhookto receive notifications about sent message statuses). -
To receive notifications about deleting or editing a message, you need to additionally enable the
editedMessageWebhookanddeletedMessageWebhookwebhooks.
Webhook body example#
{
"typeWebhook": "outgoingMessageReceived",
"instanceData": {
"idInstance": 7103000000,
"wid": "79876543210@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1588091580,
"idMessage": "F7AEC1B7086ECDC7E6E4B825",
"senderData": {
"chatId": "79001234567@c.us",
"sender": "79876543210@c.us",
"chatName": "Jane",
"senderName": "John",
"senderContactName": "John Doe"
},
"messageData":{
// Depending on typeMessage = textMessage || imageMessage || videoMessage || documentMessage || audioMessage || locationMessage || contactMessage || extendedTextMessage || pollMessage || editedMessage || deletedMessage
...
...
...
}
}
}