Skip to content

Get Group Members ​

GET /group/member

List the members of a WhatsApp group, including their names and numbers (unless they're hidden).

Endpoint Details ​

  • Base URL: https://api-zawa.azickri.com
  • Headers: id and session-id
  • Requires: a connected session (isConnected: true)

Parameters ​

ParameterInTypeRequiredDescription
idheaderstringYesThe id from Create Session.
session-idheaderstringYesThe sessionId from Create Session.
groupIdquerystringYesGroup ID, e.g. [email protected].

Example Request ​

bash
curl "https://api-zawa.azickri.com/group/[email protected]" \
  -H "id: YOUR_ID" \
  -H "session-id: YOUR_SESSION_ID"
javascript
import axios from 'axios';

const response = await axios.get('https://api-zawa.azickri.com/group/member', {
  params: {
    groupId: '[email protected]',
  },
  headers: {
    'id': 'YOUR_ID',
    'session-id': 'YOUR_SESSION_ID',
  },
});

console.log(response.data);
javascript
const params = new URLSearchParams({
  groupId: '[email protected]',
});

const response = await fetch(`https://api-zawa.azickri.com/group/member?${params}`, {
  headers: {
    'id': 'YOUR_ID',
    'session-id': 'YOUR_SESSION_ID',
  },
});

const data = await response.json();
console.log(data);

Response ​

json
{
  "docs": [
    {
      "id": "[email protected]",
      "name": "Azickri",
      "phone": "6281234567890"
    },
    {
      "id": "123456789012345@lid",
      "name": "",
      "phone": ""
    }
  ]
}
json
// groupId is missing
{
  "statusCode": 400,
  "message": "groupId should not be empty\ngroupId must be a string"
}

// Missing headers
{
  "statusCode": 400,
  "message": "invalid header"
}
json
{
  "statusCode": 404,
  "message": "session not found"
}
json
{
  "statusCode": 500,
  "message": "session not connected"
}
FieldTypeDescription
docsarrayThe list of group members.
docs[].idstringThe member's WhatsApp ID. Ends in either @s.whatsapp.net or @lid.
docs[].namestringThe member's name from your address book. Falls back to their number.
docs[].phonestringThe member's number in international format. May be empty.

Why are some numbers empty?

WhatsApp can now hide group members' numbers behind an anonymous ID ending in @lid. If the number isn't in your address book either, phone (and name) will be empty. That's WhatsApp's rule, not a Zawa bug. 🙏