Table of Contents

Getting the session list

This command is used to get the list of sessions for an account.

Request command

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

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

Request body object

The request body accepts:

{
  "WhatsappID" : "",
  "name" : "",
  "status" : "",
  "page_cnt" : "",
  "page" : ""
}

All fields in this object are optional, so an empty object is enough to get the full list of active sessions. Fields WhatsappID, name, and status are filters.

Response object

Successful response object

{
  "result": "OK",
  "pages" : 1,
  "elements" : 2,
  "page" : 1,
  "data" : [
     {
        "id": 151,
        "name": "My WhatsApp 1",
        "unique_id": "6345454545454",
        "status": "AUTH",
        "callback": "",
        "date_add": "2022-10-11 19:30:14",
        "status_name": "Authorization",
        "pushname": null,
        "wid": null,
        "qr_link": "https://whatsgate.org/qr/6345454545454"
     },
     {
        "id": 152,
        "name": "My WhatsApp 2",
        "unique_id": "6345454545455",
        "status": "READY",
        "callback": "",
        "date_add": "2022-10-12 10:35:01",
        "status_name": "Working",
        "pushname": "Vasya",
        "wid": "79991234567@c.us",
        "qr_link": ""
     },
  ]
}