WasenderAPI icon

WasenderAPI

Manage WasenderAPI sessions, messages, contacts, and groups

Contact → Block Contact

AI-generated

Overview

This node operation blocks a specified contact in a WhatsApp session using the WasenderAPI. It is useful for automating the management of contacts by programmatically blocking unwanted or spam contacts. For example, a user can block a contact by providing the contact's JID (Jabber ID) and the session ID associated with the WhatsApp session.

Use Case Examples

  1. Block a contact by selecting the contact from a list and specifying the session to block communications from that contact automatically.
  2. Block a contact by entering the contact's JID directly to prevent receiving messages from that contact.

Properties

Name Meaning
Session Optional selection of the WhatsApp session to use for the operation. If not provided, the session from the incoming item is used automatically.
Auto Selected Session ID Hidden property that automatically captures the session ID from the incoming item if available.
Has Auto Selected Session Hidden boolean indicating if there is an auto-selected session ID available from the incoming item.
Contact The contact to block, specified either by selecting from a list of contacts or by entering the contact's JID directly.
Options Additional request options for the API call, including retry behavior and maximum retry attempts.

Output

JSON

  • json - The JSON response from the WasenderAPI after blocking the contact, containing details about the operation result.

Dependencies

  • WasenderAPI service with an API key credential for authentication

Troubleshooting

  • Ensure the session ID is correctly provided or available in the incoming item; otherwise, the node will throw an error indicating a session is required.
  • Verify the contact JID is correctly formatted and exists in the session's contact list to avoid errors from the API.
  • If the API request fails due to rate limiting or server errors, the node can retry the request based on the configured retry options.
  • Common error messages include missing session ID, invalid contact JID, or unsupported operation errors, which can be resolved by checking input parameters and session availability.

Links

Discussion