Skip to content

Sent message with a video #

This section describes the format of the incoming notification messageData object for a sent message with a video. For a description of the general format of incoming notifications, refer to the Sent messages section.

To receive incoming notifications of this kind, two conditions must be met:

  • typeWebhook = outgoingMessageReceived || outgoingAPIMessageReceived
  • messageData.typeMessage = videoMessage

Instance settings

To receive incoming notifications about sent messages, you need to enable the settings in one of the ways presented:

  1. Through the console, enable the Receive notifications about messages sent from the phone and Receive notifications about messages sent through the API settings (additionally Receive notifications about the statuses of sent messages to receive notifications about the statuses of a sent message)

  2. Through the SetSettings method, enable the outgoingMessageWebhook and outgoingAPIMessageWebhook settings (additionally outgoingWebhook to receive notifications about the statuses of a sent message)

Notification#

Notification format#

Fields of the messageData object

Parameter Type Description
typeMessage string Type of the sent message. For messages of this type the field takes the value: imageMessage, videoMessage, documentMessage, audioMessage
fileMessageData object Object with data about the sent file
quotedMessage object Object with data about the quoted message.
Present only if the message itself is a quote

Fields of the fileMessageData object

Parameter Type Description
downloadUrl string Link for downloading the file
caption string Caption under the image or video
fileName string File name, generated automatically
jpegThumbnail string Image preview in base64
mimeType string File type, according to the Media Types classification
isForwarded boolean Flag of a forwarded message, true/false
forwardingScore integer Number of times the message has been forwarded
videoNote boolean A field for video messages. Takes the value true for an instant video message and false for a regular video message

Fields of the quotedMessage object

Parameter Type Description
stanzaId string id of the quoted message
participant string id of the sender of the quoted message

Notification body example#

Example of a notification body for a sent message with a video#

{
  "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": {
    "typeMessage": "videoMessage",
    "fileMessageData": {
      "downloadUrl": "https://4100.api.green-api.com/download/4100/339bca7d-egg7-4add-89c4-9bac7023921f.mp4",
      "caption": "",
      "fileName": "1763115112.mp4",
      "jpegThumbnail": "UklGRjoAAABXRUJQVlA4IC4AAACwAwCdASoyADIAPm0skkYkIqGhLggAgA2JaQAAZAEm0xUUDzF5wAD++yGAAAAA",
      "isAnimated": false,
      "mimeType": "video/mp4",
      "forwardingScore": 0,
      "isForwarded": false,
      "videoNote": false
    }
  }
}

Example of a notification body for a message with a video sent to a group chat#

{
  "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": {
    "typeMessage": "videoMessage",
    "fileMessageData": {
      "downloadUrl": "https://4100.api.green-api.com/download/4100/339bca7d-egg7-4add-89c4-9bac7023921f.mp4",
      "caption": "",
      "fileName": "1763115112.mp4",
      "jpegThumbnail": "UklGRjoAAABXRUJQVlA4IC4AAACwAwCdASoyADIAPm0skkYkIqGhLggAgA2JaQAAZAEm0xUUDzF5wAD++yGAAAAA",
      "isAnimated": false,
      "mimeType": "video/mp4",
      "forwardingScore": 0,
      "isForwarded": false,
      "videoNote": false
    }
  }
}