Node.js
// Requires the documented scopes. Keep keys on your server.
// For writes, persist the request key first; inspect unknown results.
const result = await client.request("/groups/120000000000@g.us/join-requests", { method: "POST", body: {"action":"approve","participants":["910000000101@c.us"],"expectedVersion":"CURRENT_QUEUE_VERSION"}, idempotencyKey: process.env.IDEMPOTENCY_KEY });
console.log(result);{
"state": "completed",
"replayed": true,
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}WhatsApp actions
Approve or reject group join requests
groups:requests on the selected group and current admin status. Only exact pending requester IDs with the current queue version are accepted. A partial or unconfirmed provider result remains unknown; never replay it.
Node.js
// Requires the documented scopes. Keep keys on your server.
// For writes, persist the request key first; inspect unknown results.
const result = await client.request("/groups/120000000000@g.us/join-requests", { method: "POST", body: {"action":"approve","participants":["910000000101@c.us"],"expectedVersion":"CURRENT_QUEUE_VERSION"}, idempotencyKey: process.env.IDEMPOTENCY_KEY });
console.log(result);{
"state": "completed",
"replayed": true,
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Body
application/json