Reject WhatsApp group join requests
POST
/v1/whatsapp/groups/{group_id}/join-requests/batch-reject
const result = await bird.whatsapp.groups.joinRequests.reject(
"wag_01krdgeqcxet5s7t44vh8rt9mg",
{ join_request_ids: ["wgj_01krdgeqcxet5s7t44vh8rt9mg"] },
);
for (const failure of result.failed) {
console.log(failure.join_request_id, failure.error.description);
}result = client.whatsapp.groups.join_requests.reject(
"wag_01krdgeqcxet5s7t44vh8rt9mg",
join_request_ids=["wgj_01krdgeqcxet5s7t44vh8rt9mg"],
)
for failure in result.failed:
print(failure.join_request_id, failure.error.description)result, err := client.Whatsapp.Groups.JoinRequests.Reject(context.Background(), "wag_01krdgeqcxet5s7t44vh8rt9mg", bird.WhatsappGroupsJoinRequestsRejectParams{
JoinRequestIDs: []string{"wgj_01krdgeqcxet5s7t44vh8rt9mg"},
})
if err != nil {
log.Fatal(err)
}
for _, failure := range *result.Failed {
fmt.Println(failure.JoinRequestId, failure.Error.Description)
}$result = $bird->whatsapp->groups->joinRequests->reject(
'wag_01krdgeqcxet5s7t44vh8rt9mg',
(new WhatsAppGroupJoinRequestDecision())->setJoinRequestIds(['wgj_01krdgeqcxet5s7t44vh8rt9mg']),
);
foreach ($result->getFailed() ?? [] as $failure) {
echo $failure->getJoinRequestId(), ' ', $failure->getError()?->getDescription(), PHP_EOL;
}bird whatsapp groups join-requests reject <group-id> \
--join-request-ids wgj_01krdgeqcxet5s7t44vh8rt9mg \
--yescurl -X POST "https://us1.platform.bird.com/v1/whatsapp/groups/{group_id}/join-requests/batch-reject" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"join_request_ids": [
"wgj_01krdgeqcxet5s7t44vh8rt9mg"
]
}'Réponse202
{
"decided": [
"wgj_01krdgeqcxet5s7t44vh8rt9mg"
],
"failed": [
{
"join_request_id": "wgj_01krdgeqcxet5s7t44vh8rt9mg",
"error": {
"description": "Group subject contains content that cannot be used.",
"meta_error_code": "2388024"
}
}
]
}
Rejects the named join requests, up to 50 in one call.
WhatsApp decides each request on its own, so the batch can be part-applied:
the response lists the ones it accepted in decided and the rest in
failed with the reason each was refused. A refusal is usually a person
who has not accepted WhatsApp's current terms, which no retry fixes.
A group that is not active refuses the whole call, with a 409
WhatsAppGroupNotActive, rather than returning per-request failures.
Each person rejected sees the option to ask again the next time they open the invite link, so a rejection is not a ban. Remove someone through the participants operation if they should not be able to come back.
Paramètres
group_id
string
ID of the group whose join requests are being decided.
Corps de la requête
join_request_ids
array of string
obligatoire
The join requests to act on, as returned by GET /v1/whatsapp/groups/{group_id}/join-requests. Each is decided on its own, so one can fail while the rest succeed. An ID that names no waiting request returns a 422 WhatsAppGroupJoinRequestNotFound. The 50 is Bird's own request bound, not a WhatsApp one: how many people the group can hold does not limit how many can queue at its link, so a rejection sweep is not held to the size of the group it is refusing entry to.
Contenu de la réponse
decided
array of string
obligatoire
The join requests WhatsApp accepted the decision for. A person approved here can enter the group; a person rejected here sees the join button again.
failed
array of object
obligatoire
The join requests WhatsApp refused, each with its reason. Empty when the whole batch was applied.
Afficher les attributs enfants
failed.join_request_id
string
obligatoire
The join request that was not decided.
failed.error
object
obligatoire
Why WhatsApp refused. The common one is a person who has not accepted WhatsApp's current terms, which no retry fixes.
Afficher les attributs enfants
failed.error.description
string
obligatoire
WhatsApp's own explanation of the refusal, passed through. Show it to the person who asked for the change; never match on its text. Carries Bird's own words instead when the failure was Bird's verdict, such as a confirmation that never arrived.
failed.error.meta_error_code
nullable string
WhatsApp's most specific code for the refusal: its error subcode where it sent one, otherwise its top-level code. Treat it as an opaque string. Null when the failure was Bird's own verdict rather than a WhatsApp refusal.
Ressources associées
Poursuivez avec la documentation, les guides et les exemples sur ce sujet. Les ressources sont en anglais.
Comprendre le conceptShould I use a Bird SDK or call the API directly?Suivre le parcours d'apprentissageBuild your first integrationGuide d'implémentationSend your first email
Obtenir un guide d'implémentation