Skip to main content

List WhatsApp Groups

Using a 2Chat-connected number as the source, this endpoint will get you a list of all groups such number is a participant of.

Invocation

curl -L -G 'https://api.p.2chat.io/open/whatsapp/groups/+595981048477' \
--header 'X-User-API-Key: your_api_key_here'

Response

The API will return an array of WhatsApp groups that the source number is a participant of.

info

If you joined a group very recently, like in minutes ago, it can take a few more minutes for 2Chat to be able to list it.

info

If you connected your number to 2Chat for the first time, it can take between 5 to 30 minutes for your WhatsApp groups to be listed. If more than 30 minutes have passed and you still can't see your group, please get it touch with us using our Customer Support channels.

{
{
"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": "17137157533@c.us",
"wa_group_name": "2chat test group 👌",
"wa_created_at": "2022-10-23T17:11:41Z",
"wa_subject": "daily motivational quotes 💪",
"size": 4,
"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": "..."
}
}
]
}
}
tip

You will need the UUID of the group to send a message to it using the API

FieldDescriptionExample value
uuidThe unique identifier of the groupWAG768beeef-2b96-4bc7-9b7f-045078568723
channel_uuidThe unique identifier of the channelWPN95841312-b54d-46e3-b0bc-6414f4a5296b
wa_group_idWhatsApp's internal identifier for the group...@g.us
profile_pic_urlURL to the profile picture of the grouphttps://...
wa_owner_idWhatsApp's internal identifier for the owner of the group17137157533@c.us
wa_group_nameName of the group2chat test group 👌
wa_created_atThe date the group was created at2022-10-23T17:11:41Z
wa_subjectSubject of the groupdaily motivational quotes 💪
sizeThe number of participants in this group4
is_mutedWhether the group is muted on your phonefalse
is_read_onlyWhether the group is read-only or notfalse
channel_is_ownerWhether you own the group or notfalse
created_atTimestamp of when the group was registered on 2Chat2023-06-22T20:02:56Z
updated_atThe last time 2Chat pulled information about the group2023-07-12T19:18:41Z
owner_contactThe contact information of the owner of the group, if presenttrue