WAHA

Connect with Whatsapp HTTP API

Actions116

Overview

This node retrieves a list of contacts from a specified session. It supports sorting the contacts by either their ID or name, in ascending or descending order. Users can also limit the number of contacts returned and specify an offset for pagination. This node is useful for scenarios where you need to fetch and process multiple contacts from a session, such as syncing contact lists, generating reports, or integrating contact data with other systems.

Use Case Examples

  1. Fetch all contacts sorted by name in ascending order to display in a user interface.
  2. Retrieve a limited number of contacts with pagination for batch processing.
  3. Get contacts sorted by ID in descending order for data analysis.

Properties

Name Meaning
Session The session identifier used to query contacts from a specific session.
Sort By The field by which to sort the contacts, either by 'id' or 'name'.
Sort Order The order in which to sort the contacts, either descending (newest first) or ascending (oldest first).
Limit The maximum number of contacts to retrieve. A value of 0 means no limit.
Offset The number of contacts to skip before starting to collect the result set, used for pagination.
Request Options Additional options for the request such as batching, SSL certificate validation, proxy settings, and timeout configuration.

Output

JSON

  • contacts - An array of contact objects retrieved from the session, each containing contact details such as ID, name, and other relevant information.

Dependencies

  • Requires an API key credential or session token to authenticate requests to the contacts service.

Troubleshooting

  • If the session parameter is missing or invalid, the node will fail to retrieve contacts. Ensure the session value is correctly provided.
  • Incorrect sorting field or order may result in unexpected contact order; verify 'Sort By' and 'Sort Order' values.
  • Network issues or proxy misconfiguration can cause request failures; check proxy settings and network connectivity.
  • SSL certificate validation errors can be bypassed by enabling 'Ignore SSL Issues', but this reduces security.
  • Timeout errors may occur if the server is slow to respond; increase the timeout setting if needed.

Discussion