Skip to content

List group participants ​

Returns the members of a WhatsApp group with their role.

GET/api/user/whatsapp-qr/channels/{channel}/groups/{groupId}/participants
Required scope: whatsapp-qr:read
Path parameters
integer
string
curl -X GET "https://loopx-console.test/api/user/whatsapp-qr/channels/105/groups/120363025988123456%40g.us/participants" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/json"
<?php

use GuzzleHttp\Client;

$client = new Client();
$response = $client->request('GET', 'https://loopx-console.test/api/user/whatsapp-qr/channels/105/groups/120363025988123456%40g.us/participants', [
    'headers' => [
        'Authorization' => 'Bearer $TOKEN',
        'Accept'        => 'application/json',
    ]
]);

$data = json_decode($response->getBody(), true);
const res = await fetch('https://loopx-console.test/api/user/whatsapp-qr/channels/105/groups/120363025988123456%40g.us/participants', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer $TOKEN',
    Accept: 'application/json'
  }
});

const data = await res.json();

Example response

{
  "status": true,
  "code": 200,
  "validation": [],
  "message": "Group Participants",
  "data": [
    {
      "id": "201142407509@c.us",
      "role": "superadmin"
    },
    {
      "id": "201066278084@c.us",
      "role": "admin"
    },
    {
      "id": "25318949687344@lid",
      "pn": "201011111111@c.us",
      "role": "participant"
    }
  ]
}

Path parameters ​

NameTypeRequiredDescription
channelintegeryesWhatsApp QR Code channel id
groupIdstringyesGroup id (…@g.us) from List groups

Response fields ​

FieldTypeDescription
idstringMember's WhatsApp id (…@c.us or …@lid). You can use it as chat_id to message them directly.
pnstringPhone-number id of a @lid member, when WhatsApp shares it
rolestringsuperadmin (the group's creator), admin, participant or left

A group that doesn't exist, or that the number isn't a member of, returns 404.