Skip to main content
GET
/
api
/
{session}
/
groups
Get all groups
curl --request GET \
  --url https://{host}/api/{session}/groups \
  --header 'apikey: <api-key>'
{
  "groups": [
    {
      "id": "120363XXXXX@g.us",
      "subject": "Group 1",
      "participants": [...],
      "creation": 1234567890
    },
    {
      "id": "120363YYYYY@g.us",
      "subject": "Group 2",
      "participants": [...],
      "creation": 1234567891
    }
  ]
}

Description

This endpoint returns a list of all groups that the session is participating in.

URL Parameters

session
string
required
WhatsApp unique session ID

Response

groups
array
Array containing all groups of the session
{
  "groups": [
    {
      "id": "120363XXXXX@g.us",
      "subject": "Group 1",
      "participants": [...],
      "creation": 1234567890
    },
    {
      "id": "120363YYYYY@g.us",
      "subject": "Group 2",
      "participants": [...],
      "creation": 1234567891
    }
  ]
}

Status Codes

  • 200 - Groups listed successfully
  • 400 - Invalid parameters
  • 401 - Unauthorized

Usage Example

curl -X GET https://api.wappfy.com.br/api/my-session/groups

Authorizations

apikey
string
header
required

Your Wappfy API key (get it at dash.wappfy.com.br)

Query Parameters

sortBy
enum<string>

Sort by field

Available options:
id,
subject
sortOrder
enum<string>

Sort order - <b>desc</b>ending (Z => A, New first) or <b>asc</b>ending (A => Z, Old first)

Available options:
desc,
asc
limit
number
offset
number
exclude
enum<string>[]

Exclude fields

Response

200 - application/json

The response is of type object.

I