BASH
curl -X POST "https://api.wachap.com/v1/whatsapp/groups/update/description" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer token" \
-d '{
"accountId": "a1233b-a1233b-a1233b-a1233b-a1233bcdjdg9878",
"groupJid": "120363123456789012@g.us",
"description": "New Description"
}'const res = await fetch("https://api.wachap.com/v1/whatsapp/groups/update/description", {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer token'
},
body: JSON.stringify({
accountId: "a1233b-a1233b-a1233b-a1233b-a1233bcdjdg9878",
groupJid: "120363123456789012@g.us",
description: "New Description"
})
});
const data = await res.json();
console.log(data);const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({accountId: '<string>', groupJid: '<string>', description: '<string>'})
};
fetch('https://api.wachap.com/v1/whatsapp/groups/update/description', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wachap.com/v1/whatsapp/groups/update/description"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer token"
}
data = {
"accountId": "a1233b-a1233b-a1233b-a1233b-a1233bcdjdg9878",
"groupJid": "120363123456789012@g.us",
"description": "New Description"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())<?php
$url = 'https://api.wachap.com/v1/whatsapp/groups/update/description';
$data = [
'accountId' => 'a1233b-a1233b-a1233b-a1233b-a1233bcdjdg9878',
'groupJid' => '120363123456789012@g.us',
'description' => 'New Description'
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'Authorization: Bearer token'
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wachap.com/v1/whatsapp/groups/update/description"
payload := strings.NewReader("{\n \"accountId\": \"<string>\",\n \"groupJid\": \"<string>\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"message": "<string>",
"newDescription": "<string>"
}Groupes WhatsApp
Modifier la description
Modifiez la description d’un groupe WhatsApp.
POST
/
whatsapp
/
groups
/
update
/
description
BASH
curl -X POST "https://api.wachap.com/v1/whatsapp/groups/update/description" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer token" \
-d '{
"accountId": "a1233b-a1233b-a1233b-a1233b-a1233bcdjdg9878",
"groupJid": "120363123456789012@g.us",
"description": "New Description"
}'const res = await fetch("https://api.wachap.com/v1/whatsapp/groups/update/description", {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer token'
},
body: JSON.stringify({
accountId: "a1233b-a1233b-a1233b-a1233b-a1233bcdjdg9878",
groupJid: "120363123456789012@g.us",
description: "New Description"
})
});
const data = await res.json();
console.log(data);const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({accountId: '<string>', groupJid: '<string>', description: '<string>'})
};
fetch('https://api.wachap.com/v1/whatsapp/groups/update/description', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wachap.com/v1/whatsapp/groups/update/description"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer token"
}
data = {
"accountId": "a1233b-a1233b-a1233b-a1233b-a1233bcdjdg9878",
"groupJid": "120363123456789012@g.us",
"description": "New Description"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())<?php
$url = 'https://api.wachap.com/v1/whatsapp/groups/update/description';
$data = [
'accountId' => 'a1233b-a1233b-a1233b-a1233b-a1233bcdjdg9878',
'groupJid' => '120363123456789012@g.us',
'description' => 'New Description'
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'Authorization: Bearer token'
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wachap.com/v1/whatsapp/groups/update/description"
payload := strings.NewReader("{\n \"accountId\": \"<string>\",\n \"groupJid\": \"<string>\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"message": "<string>",
"newDescription": "<string>"
}Endpoint
POST https://api.wachap.com/v1/whatsapp/groups/update/description
Headers
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| Authorization | string | Oui | Bearer token avec votre Secret Key (format: Bearer sk_...) |
Body Parameters
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| accountId | string | Oui | L’identifiant du compte WhatsApp |
| groupJid | string | Oui | L’identifiant du groupe (format: 120363123456789012@g.us) |
| description | string | Oui | La nouvelle description du groupe (max 512 caractères) |
Exemple de requête
curl -X POST https://api.wachap.com/v1/whatsapp/groups/update/description \
-H "Content-Type: application/json" \
-H "Authorization: Bearer token" \
-d '{
"accountId": "a1233b-a1233b-a1233b-a1233b-a1233bcdjdg9878",
"groupJid": "120363123456789012@g.us",
"description": "Nouvelle description du groupe"
}'
Exemple de réponse
{
"success": true,
"message": "Description du groupe modifiée avec succès",
"groupJid": "120363123456789012@g.us",
"newDescription": "Nouvelle description du groupe"
}
Notes
- Vous devez être administrateur du groupe pour modifier la description
- La description ne peut pas dépasser 512 caractères
Codes d’erreur
| Code | Description |
|---|---|
| 400 | MISSING_ACCOUNT_ID - accountId manquant |
| 400 | MISSING_GROUP_JID - groupJid manquant |
| 400 | DESCRIPTION_TOO_LONG - La description dépasse 512 caractères |
| 401 | INVALID_SECRET_KEY - Clé secrète invalide |
| 403 | NOT_ADMIN - Vous n’êtes pas administrateur du groupe |
| 404 | ACCOUNT_NOT_FOUND - Compte WhatsApp non trouvé |
Autorisations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Corps
application/json
⌘I
