WAHA

Connect with Whatsapp HTTP API

Actions116

Overview

This node operation sets the message sending permissions in a WhatsApp group to be admin-only or not. It is useful for managing group communication by restricting message sending to group admins, which helps in controlling spam or maintaining order in large groups. For example, a community manager can use this to ensure only admins can post announcements in a group.

Use Case Examples

  1. Restrict messages in a group to admins only to prevent spam.
  2. Allow all members to send messages by disabling admin-only mode.

Properties

Name Meaning
Session The session name to identify the WhatsApp session to use for the operation.
Id The unique identifier of the WhatsApp group where the message sending permissions will be set.
Admins Only Boolean flag to enable or disable admin-only message sending in the group.
Request Options Additional options for the request such as batching, SSL certificate handling, proxy settings, and timeout configuration.

Output

JSON

  • success - Indicates if the operation to set admin-only message permissions was successful.
  • groupId - The ID of the group where the setting was applied.
  • adminsOnly - The final state of the admin-only message setting after the operation.

Dependencies

  • Requires a valid WhatsApp session identified by the session name to interact with the WhatsApp API.

Troubleshooting

  • Ensure the session name corresponds to an active and authenticated WhatsApp session.
  • Verify the group ID is correct and the bot or user has admin privileges in the group to change settings.
  • If the operation fails, check network connectivity and proxy settings if used.
  • Timeout errors may occur if the server is slow to respond; increase the timeout setting if needed.

Discussion