Table of Contents

Incoming events processing (events-get)

This command is used to request and retrieve a list of incoming events, such as:

Request command

To retrieve the event list, send a POST request to:

https://whatsgate.org/api/v1/events-get

Request body object

The request body accepts the following object:

{
  "WhatsappID" : "XXXXXXXXXXXXX",
  "date" : "YYYY-MM-DD HH:MM:SS",
  "action" : "message",
  "page_cnt" : "10",
  "page" : "1"
}

All fields in this object are optional, meaning an empty object is enough to get the full list of events. Fields WhatsappID and action are filters, and date limits events by date. The date is typically used like this: after reading events, take the date of the last event and pass it in the next request as date to fetch only newer events.

Response object

Successful response object

{
  "result": "OK",
  "pages" : 1,
  "elements" : 2,
  "page" : 1,
  "data" : [
     // 
  ]
}