Webhook Example

Webhook is a feature that allows you to receive a callback from our server when a message is incoming to your device. You can use this feature for made a dinamic chatbot or whatever you want.

We will send a POST request to your webhook url with a JSON body. Here is an example of the JSON body we will send:

        
{
  "device" : "your sender/device"
  "message" : "message",
  "from" : "the number of the whatsapp sender",
  "name" : "the name of the sender",
  "participant" : "sender number if group",
  "ppUrl" : "url profile picture sender",
  "media" : [
    "caption" : "caption, equal to message",
    "fileName" : "xxxx.xx",
    "stream" : [
        "type" : "Buffer",
        "data" : "xxxx"
        ]
    ],
    "mimetype" : "image\/jpeg" // depends to media type, could be image,document,audio etc
    ] // null if no media
}

        
      

For example webhook you can see in Here