Get Messages Admin Only
Learn how to check if only admins can send messages in a WhatsApp group
Get Messages Admin Only
This endpoint allows you to check whether only administrators can send messages in a WhatsApp group.
Endpoint
GET /api/groups/{groupId}/messages-admin-only
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
groupId | string | Yes | The ID of the WhatsApp group |
Response
{
"success": boolean,
"data": {
"messagesAdminOnly": boolean
}
}
Example
const response = await fetch('/api/groups/123456789/messages-admin-only', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);
// {
// "success": true,
// "data": {
// "messagesAdminOnly": true
// }
// }
Notes
- This setting determines whether only group administrators can send messages in the group
- When
messagesAdminOnly
istrue
, regular participants cannot send messages - When
messagesAdminOnly
isfalse
, all participants can send messages - Only group administrators can check this setting