[go: up one dir, main page]

Skip to content

Message sent from phone#

The format of a message sent fromphone is identical to incoming 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:

  1. Through console enable the settings Get notifications about messages sent from the phone (optional Get notifications about outgoing messages sending/delivering/reading statuses to receive notifications about the statuses of the sent message)

  2. Through the SetSettings method enable the settings outgoingMessageWebhook (optional outgoing Webhook to receive notifications about sent message statuses)

Webhook body example#

{
    "typeWebhook": "outgoingMessageReceived",
    "instanceData": {
        "idInstance": 1234,
        "wid": "11001234567@c.us",
        "typeInstance": "whatsapp"
    },
    "timestamp": 1588091580,
    "idMessage": "F7AEC1B7086ECDC7E6E45923F5EDB825",
    "senderData": {
        "chatId": "79001234568@c.us",
        "sender": "79001234568@c.us",
        "chatName": "Reacheal",
        "senderName": "John",
        "senderContactName": "John Doe"
    },
    "messageData":{
       // Depending on typeMessage = textMessage || imageMessage || videoMessage || documentMessage || audioMessage || locationMessage || contactMessage || extendedTextMessage || pollMessage
       ...
       ...
       ...
        }
    }
}