SparkBot icon

SparkBot

Interact with SparkBot WhatsApp API

Actions148

Overview

The "Reject Members" operation under the "Groups" resource allows users to reject pending membership requests in a WhatsApp group managed via the SparkBot WhatsApp API. This node is useful for administrators who want to control group membership by selectively rejecting certain phone numbers or rejecting all pending members at once.

Practical scenarios include:

  • Automatically rejecting spam or unauthorized join requests to a WhatsApp group.
  • Managing group membership approvals programmatically based on custom criteria.
  • Bulk rejecting all pending members when cleaning up group membership requests.

Properties

Name Meaning
WhatsApp Number The ID of the WhatsApp number (device) from which the group is managed.
Group ID The unique identifier of the WhatsApp group where members are to be rejected.
Approve All Boolean flag indicating whether to reject all pending members in the group.
Phone Numbers List of phone numbers to reject from the pending members list (used only if "Approve All" is false).

Output

The node outputs JSON data representing the result of the reject members operation. Typically, this will include confirmation of which members were rejected or an error message if the operation failed.

No binary data output is expected from this operation.

Dependencies

  • Requires an active connection to the SparkBot WhatsApp API.
  • Needs an API key credential configured in n8n for authentication with the SparkBot service.
  • The node depends on dynamic loading of WhatsApp devices and groups for selection in properties.

Troubleshooting

  • Common Issues:

    • Invalid or missing WhatsApp number (device) ID can cause failures in identifying the correct source device.
    • Incorrect or expired group ID may lead to errors when attempting to reject members.
    • Providing phone numbers that are not pending members might result in no action or errors.
    • Network or authentication issues with the SparkBot API can prevent successful execution.
  • Error Messages:

    • Errors related to authorization typically indicate problems with the API key credential; verify and update as needed.
    • "Group not found" or similar messages suggest the group ID is invalid or the device does not have access to it.
    • Validation errors on phone numbers usually mean the format is incorrect or the numbers are not pending members.

To resolve these, ensure all IDs and phone numbers are correct, the API key is valid, and the device has access to the specified group.

Links and References

Discussion