Passer au contenu principal
POST
/
whatsapp
/
groups
/
members
/
list
Lister les membres
curl --request POST \
  --url https://api.wachap.com/v1/whatsapp/groups/members/list \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "accountId": "<string>",
  "groupJid": "<string>"
}
'
{
  "success": true,
  "message": "<string>",
  "groupJid": "<string>",
  "total": 123,
  "members": [
    {
      "jid": "<string>",
      "phoneNumber": "<string>",
      "name": "<string>",
      "isAdmin": true,
      "isSuperAdmin": true
    }
  ]
}

Endpoints

Option 1: GroupJid dans le body

POST https://api.wachap.com/v1/whatsapp/groups/members/list

Option 2: GroupJid dans l’URL (rétrocompatibilité)

POST https://api.wachap.com/v1/whatsapp/groups/:groupJid/members/list

Headers

ParamètreTypeRequisDescription
AuthorizationstringOuiBearer token avec votre Secret Key (format: Bearer sk_...)

Body Parameters (Option 1)

ParamètreTypeRequisDescription
accountIdstringOuiL’identifiant du compte WhatsApp
groupJidstringOuiL’identifiant du groupe (format: [email protected])

Body Parameters (Option 2)

ParamètreTypeRequisDescription
accountIdstringOuiL’identifiant du compte WhatsApp

Exemples de requêtes

Option 1: GroupJid dans le body

curl -X POST https://api.wachap.com/v1/whatsapp/groups/members/list \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer VOTRE_CLE_SECRETE" \
  -d '{
    "accountId": "account_xxx",
    "groupJid": "[email protected]"
  }'

Option 2: GroupJid dans l’URL

curl -X POST https://api.wachap.com/v1/whatsapp/groups/[email protected]/members/list \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer VOTRE_CLE_SECRETE" \
  -d '{
    "accountId": "account_xxx"
  }'

Exemple de réponse

{
  "success": true,
  "message": "Membres récupérés avec succès",
  "groupJid": "[email protected]",
  "total": 15,
  "members": [
    {
      "jid": "[email protected]",
      "phoneNumber": "22962861571",
      "name": "John Doe",
      "isAdmin": true,
      "isSuperAdmin": true
    },
    {
      "jid": "[email protected]",
      "phoneNumber": "33612345678",
      "name": "Marie Dupont",
      "isAdmin": false,
      "isSuperAdmin": false
    }
  ]
}

Codes d’erreur

CodeDescription
400MISSING_ACCOUNT_ID - accountId manquant
400MISSING_GROUP_JID - groupJid manquant
401INVALID_SECRET_KEY - Clé secrète invalide
404ACCOUNT_NOT_FOUND - Compte WhatsApp non trouvé
404GROUP_NOT_FOUND - Groupe non trouvé

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Corps

application/json
accountId
string

L'identifiant du compte WhatsApp

groupJid
string

L'identifiant du groupe (format: [email protected])

Réponse

200 - application/json

OK

success
boolean
message
string
groupJid
string
total
integer
members
object[]