Message sent from the phone#
The format of a message sent from the phone or the web version.
It is identical to the format of an incoming message, while the incoming notification type takes the value outgoingMessageReceived.
Instance settings
To receive incoming notifications about messages sent from the phone, the web version and the desktop version, you need to enable the settings in one of the ways presented:
-
Through the console, enable the
Receive notifications about messages sent from the phonesetting (additionallyReceive notifications about the sending/delivery/read statuses of outgoing messagesto receive notifications about the statuses of a sent message) -
Through the SetSettings method, enable the
outgoingMessageWebhooksetting (additionallyoutgoingWebhookto receive notifications about the statuses of a sent message)
Notification body example#
Example of a notification body for a sent message#
{
"typeWebhook": "outgoingMessageReceived",
"instanceData": {
"idInstance": 4100000000,
"wid": "79876543210@c.us",
"typeInstance": "telegram"
},
"timestamp": 1763115112,
"idMessage": "1763115112345",
"senderData": {
"chatId": "10000000",
"chatType": "user",
"sender": "10000000",
"chatName": "Vasilisa the Wise",
"senderName": "Vasilisa the Wise",
"senderType": "user",
"senderContactName": "Vasilisa the Wise",
"senderPhoneNumber": 79876543210
},
"messageData": {
// Depending on typeMessage = textMessage || imageMessage || videoMessage || documentMessage || audioMessage
...
...
...
}
}
Example of a notification body for a message sent to a group#
{
"typeWebhook": "outgoingMessageReceived",
"instanceData": {
"idInstance": 4100000000,
"wid": "79876543210@c.us",
"typeInstance": "telegram"
},
"timestamp": 1763115112,
"idMessage": "1763468266381",
"senderData": {
"chatId": "-10000000000000",
"chatType": "supergroup",
"sender": "10000000",
"chatName": "Faraway Kingdom",
"senderName": "Vasilisa",
"senderType": "user",
"senderContactName": "",
"senderPhoneNumber": 79876543210
},
"messageData": {
// Depending on typeMessage = textMessage || imageMessage || videoMessage || documentMessage || audioMessage
...
...
...
}
}