Appearance
List groups
Returns the WhatsApp groups the channel's number is a member of, sorted by name, without the member lists. Use List group participants for those.
GET/api/user/whatsapp-qr/channels/{channel}/groups
Required scope:
whatsapp-qr:readPath parameters
integer
Query parameters
integer
integer
curl -X GET "https://loopx-console.test/api/user/whatsapp-qr/channels/105/groups?limit=50&offset=0" \
-H "Authorization: Bearer $TOKEN" \
-H "Accept: application/json"Example response
{
"status": true,
"code": 200,
"validation": [],
"message": "Groups",
"data": {
"120363025988123456@g.us": {
"id": "120363025988123456@g.us",
"subject": "Sales team",
"subjectOwner": "201142407509@s.whatsapp.net",
"subjectTime": 1700000000,
"size": 12,
"creation": 1700000000,
"owner": "201142407509@s.whatsapp.net",
"desc": "Daily leads and follow-ups",
"restrict": true,
"announce": false
}
}
}data is an object keyed by group id
Groups are returned as an object whose keys are the group ids, not as an array. Iterate over its values, e.g. Object.values(data) in JavaScript or array_values($data) in PHP.
Main response fields
| Field | Type | Description |
|---|---|---|
id | string | Group chat id (…@g.us). Use it as chat_id to send to the group. |
subject | string | Group name |
desc | string | null | Group description |
size | integer | Number of members |
creation | integer | Unix timestamp when the group was created |
owner | string | WhatsApp id of the group's creator |
announce | boolean | true when only admins can send messages |
restrict | boolean | true when only admins can edit the group's info |