WhatsApp
List Groups

List Groups

Returns all WhatsApp groups synced to a session. The chat_id field is what you use as to when sending messages to a group.

Groups must be synced first. Go to Dashboard → Sessions → Groups → Sync to pull the latest group list from the device.


Endpoint

GET /v1/whatsapp/{session_id}/groups/

Authentication: Bearer API key

Get session_id from the chat_id field in List Phones.


Request

curl https://api.talkntalk.africa/v1/whatsapp/3fa85f64-5717-4562-b3fc-2c963f66afa6/groups/ \
  -H "Authorization: Bearer tk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Response

200 OK

{
  "total":  3,
  "page":   1,
  "page_size": 100,
  "total_pages": 1,
  "next":   null,
  "previous": null,
  "groups": [
    {
      "chat_id":           "120363410923125768@g.us",
      "name":              "Marketing Team",
      "description":       "Internal marketing updates",
      "participant_count": 24,
      "is_admin":          true
    }
  ]
}
FieldDescription
chat_idGroup identifier — pass this as to when sending a group message
nameGroup display name
descriptionGroup description (may be empty)
participant_countNumber of members at last sync
is_admintrue if your number is an admin in this group

Pagination

Append ?page=2&page_size=50 to paginate large group lists.


Error Responses

StatusDescription
401 UnauthorizedMissing or invalid API key
404 Not FoundSession ID does not belong to your organisation