Skip to main content
GET
/
user
/
my
/
groups
Get My Groups
curl --request GET \
  --url https://api.example.com/user/my/groups \
  --header 'Authorization: <authorization>'
{
  "500": {},
  "code": "<string>",
  "message": "<string>",
  "results": {
    "data": [
      {
        "JID": "<string>",
        "OwnerJID": "<string>",
        "Name": "<string>",
        "NameSetAt": "<string>",
        "NameSetBy": "<string>",
        "GroupCreated": "<string>",
        "ParticipantVersionID": "<string>",
        "Participants": [
          {
            "JID": "<string>",
            "IsAdmin": true,
            "IsSuperAdmin": true,
            "Error": 123
          }
        ]
      }
    ]
  }
}
Get a complete list of all groups that you are a member of, including group details and participants.
Known Limitation: This endpoint returns a maximum of 500 groups due to a WhatsApp protocol limitation. The underlying whatsmeow library’s GetJoinedGroups() function sends a single query to WhatsApp servers, which enforces this limit. Users with more than 500 groups will only receive the first 500 groups.

Authentication

Authorization
string
required
Basic authentication credentials (username:password in base64)

Headers

X-Device-Id
string
Device identifier for multi-device support. Required when multiple devices are registered. If only one device is registered, it will be used as the default.

Response

code
string
Response code indicating success or failureExample: SUCCESS
message
string
Human-readable response messageExample: Success get list groups
results
object
Groups data
data
array
Array of group objects
JID
string
Group’s WhatsApp JID (identifier)Example: [email protected]
OwnerJID
string
JID of the group owner
Name
string
Group nameExample: My Awesome Group
NameSetAt
string
Timestamp when the group name was set
NameSetBy
string
JID of the user who set the group name
GroupCreated
string
Timestamp when the group was created
ParticipantVersionID
string
Version ID for the participants list
Participants
array
Array of participant objects
JID
string
Participant’s WhatsApp JID
IsAdmin
boolean
Whether the participant is an admin
IsSuperAdmin
boolean
Whether the participant is a super admin
Error
number
Error code if there was an issue

Example Request

curl -X GET 'http://localhost:3000/user/my/groups' \
  -u 'username:password' \
  -H 'X-Device-Id: my-device-id'

Response Example

{
  "code": "SUCCESS",
  "message": "Success get list groups",
  "results": {
    "data": [
      {
        "JID": "[email protected]",
        "OwnerJID": "[email protected]",
        "Name": "My Awesome Group",
        "NameSetAt": "2024-01-15T10:30:00Z",
        "NameSetBy": "[email protected]",
        "GroupCreated": "2024-01-10T08:00:00Z",
        "ParticipantVersionID": "1705315800",
        "Participants": [
          {
            "JID": "[email protected]",
            "IsAdmin": true,
            "IsSuperAdmin": true,
            "Error": 0
          },
          {
            "JID": "[email protected]",
            "IsAdmin": false,
            "IsSuperAdmin": false,
            "Error": 0
          }
        ]
      }
    ]
  }
}

Error Responses

500
object
Internal Server Error
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Failed to fetch groups",
  "results": null
}

Usage Notes

  • Maximum of 500 groups returned due to WhatsApp protocol limitation
  • Group JIDs end with @g.us instead of @s.whatsapp.net
  • The Participants array includes all group members with their roles
  • IsAdmin indicates if a participant can manage group settings
  • IsSuperAdmin indicates if a participant is the group creator or has elevated permissions
  • Use the /group/info endpoint to get more detailed information about a specific group
  • For more details on the limitation, see the whatsmeow source code

Build docs developers (and LLMs) love