WAHA icon

WAHA

Connect with Whatsapp HTTP API

Overview

This node operation retrieves all contacts from a specified session, allowing users to fetch a list of contacts with customizable sorting and pagination options. It is useful for scenarios where you need to manage or analyze contact data, such as exporting contact lists, syncing contacts with other systems, or displaying contacts in a dashboard.

Use Case Examples

  1. Fetch all contacts sorted by name in ascending order for a given session.
  2. Retrieve a limited number of contacts with pagination support to process them in batches.

Properties

Name Meaning
Session The session identifier used to specify which session's contacts to retrieve.
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 request options such as batching, SSL certificate validation, proxy settings, and request timeout.

Output

JSON

  • contacts - An array of contact objects retrieved from the session.
  • totalCount - The total number of contacts available in the session.

Dependencies

  • Requires an active session identifier to access contact data.

Troubleshooting

  • Ensure the session ID is valid and active; invalid or expired sessions will cause errors.
  • Check network connectivity and proxy settings if requests fail or time out.
  • If SSL certificate validation fails, consider enabling the option to ignore SSL issues, but be aware of security risks.

Discussion