List WhatsApp Group Participants
Agent Skill
Automate this endpoint with an AI agent using the 2chat-whatsapp-groups skill:
npx skills add 2ChatCo/agent-skills -s 2chat-whatsapp-groups
Get all participants of a WhatsApp group.
API costโ
1API credit
Each call to this endpoint deducts 1 API credit from your plan's API credit pool.
Invocationโ
info
You need the UUID of the group to pull this information. You can get it from the List WhatsApp Groups endpoint.
In the examples below, WAG768beeef-2b96-4bc7-9b7f-045078568723 is our group's UUID.
- cURL
- Python
- JavaScript
curl -L -G 'https://api.p.2chat.io/open/whatsapp/group/WAG768beeef-2b96-4bc7-9b7f-045078568723' \
--header 'X-User-API-Key: your_api_key_here'
import requests
url = "https://api.p.2chat.io/open/whatsapp/group/WAG768beeef-2b96-4bc7-9b7f-045078568723"
payload = ""
headers = {
'X-User-API-Key': 'your_api_key_here'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var axios = require('axios');
var data = '';
var config = {
method: 'get',
url: 'https://api.p.2chat.io/open/whatsapp/group/WAG768beeef-2b96-4bc7-9b7f-045078568723',
headers: {
'X-User-API-Key': 'your_api_key_here'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Responseโ
The API will return an array of all participants in a given WhatsApp group
{
"success": true,
"data": {
"uuid": "WAG768beeef-2b96-4bc7-9b7f-045078568723",
"channel_uuid": "WPN95841312-b54d-46e3-b0bc-6414f4a5296b",
"wa_group_id": "...@g.us",
"profile_pic_url": "...",
"wa_owner_id": "5215530483303@c.us",
"wa_group_name": "2chat test group ๐",
"wa_created_at": "2022-10-23T17:11:41Z",
"wa_subject": "daily motivational quotes ๐ช",
"size": 3,
"is_muted": false,
"is_read_only": false,
"channel_is_owner": false,
"created_at": "2023-06-22T20:02:56Z",
"updated_at": "2023-07-12T19:18:41Z",
"owner_contact": {
"uuid": "CON1653490d-194b-4992-8353-e4b46a64e321",
"first_name": "Mikey",
"last_name": "Mike",
"channel_uuid": "WPNc568c832-606c-4d50-8092-fc51b5149d16",
"profile_pic_url": "..."
},
"owner_data": {
"phone_number": "...",
"formatted_phone_number": "...",
"iso_country_code": "MX"
},
"participants": [
{
"wa_participant_id": "447700176576@c.us",
"wa_pushname": "Carlos @ 2Chat",
"profile_pic_url": "...",
"wa_is_super_admin": false,
"wa_is_admin": false,
"device": "ios",
"created_at": "2023-07-11T19:21:45Z",
"updated_at": "2023-07-12T19:18:41Z",
"contact": {
"uuid": "CON767f3ab9-e2c1-48e0-9234-092e835fa089",
"first_name": "2Chat",
"last_name": "UK",
"channel_uuid": null,
"profile_pic_url": null
},
"phone_number": "+447700176576",
"formatted_phone_number": "+44 7700 176576",
"iso_country_code": "GB"
},
{
"wa_participant_id": "5215617554529@c.us",
"wa_pushname": "Mikey",
"profile_pic_url": "...",
"wa_is_super_admin": false,
"wa_is_admin": false,
"device": null,
"created_at": "2023-07-11T19:30:03Z",
"updated_at": "2023-07-12T19:18:41Z",
"phone_number": "+525617554529",
"formatted_phone_number": "+52 56 1755 4529",
"iso_country_code": "MX"
},
{
"wa_participant_id": "595981048477@c.us",
"wa_pushname": null,
"profile_pic_url": null,
"wa_is_super_admin": false,
"wa_is_admin": true,
"device": null,
"created_at": "2023-06-23T19:43:31Z",
"updated_at": "2023-07-12T19:18:40Z",
"contact": {
"uuid": "CON36b2bc38-c21a-4712-8015-99bf2f8001f6",
"first_name": "2Chat",
"last_name": "PAR",
"channel_uuid": "WPNc568c832-606c-4d50-8092-fc51b5149d16",
"profile_pic_url": null
},
"phone_number": "+595981048477",
"formatted_phone_number": "+595 981 048477",
"iso_country_code": "PY"
}
]
}
}
| Field | Description | Example value |
|---|---|---|
owner_data | Information about the owner of the group, including their phone number | |
participant.wa_participant_id | WhatsApp's internal identifier for the participant | 595981048477@c.us |
participant.wa_pushname | Push name or Notify name of the participant | Mikey |
participant.profile_pic_url | URL to the profile picture of the partcipant | https:// |
participant.wa_is_super_admin | Whether the participant owns the group or not | true |
participant.wa_is_admin | Whether the participant is an administrator in group or not | false |
participant.device | The participant last known device | Any of android, ios, or web |
participant.phone_number | The phone number of the participant | +595981048477 |
participant.iso_country_code | The country code the phone number belongs to | PY |