API Get Whatsapp Group List

This API will Get all of your whatsapp group which previously updated.

If API update whatsapp group list had never been called, this API will always return false.

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.fonnte.com/get-whatsapp-group',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_HTTPHEADER => array(
    'Authorization: TOKEN'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

If you prefer to see on postman, see here.

TOKEN must be filled by your own token. See how to get token.

Response

Successfull response

{ 
    "data": [
        {
            "id": "xxx@g.us",
            "name": "Group name 1"
        },
        {
            "id": "xxx-xxx@g.us",
            "name": "Group name 2"
        },
        {
            "id": "xxx@g.us",
            "name": "Group name 3"
        }
    ],
    "status": true
}

- Token invalid : token is not valid

{
    "detail": "token invalid",
    "status": false
}

- Failed to get whatsapp group : There is something wrong with the group data.

{
    "detail": "failed to get whatsapp group",
    "status": false
}

- You have no whatsapp group yet : Either you have never call API update whatsapp group list or you actually haven't join any group yet

{
    "detail": "you have no whatsapp group yet",
    "status": false
}

Related knowledge

See more
Made with in Indonesia