WAREST icon

WAREST

Interact with the WARest WhatsApp REST API

Overview

This node operation lists chats from a specified WhatsApp session using the WARest WhatsApp REST API. It allows users to retrieve chat information with options to filter, sort, and paginate the results. This is useful for scenarios where you want to monitor or analyze chat activity, such as fetching recent chats, filtering chats with media, or sorting by unread count or last message time.

Use Case Examples

  1. Retrieve the last 10 chats from a specific WhatsApp session.
  2. List chats that contain media only, sorted by the last message in descending order.
  3. Search chats by a specific text filter and paginate results with offset and limit.

Properties

Name Meaning
Session Identifier of the WhatsApp session to list chats from. Can be selected from a list or entered manually.
Additional Fields Optional parameters to control the listing of chats, including limit, offset, filtering by media presence, sorting criteria, sort order, and text search filter.

Output

JSON

  • json - Array of chat objects returned by the WARest API, each representing a chat with its details such as chat ID, name, last message, unread count, and other metadata.

Dependencies

  • Requires an API key credential for the WARest WhatsApp REST API and the base URL of the API server.

Troubleshooting

  • Ensure the session ID is valid and active; otherwise, the API call will fail.
  • Check that the API key credential is correctly configured and has the necessary permissions.
  • If no chats are returned, verify the filter and pagination parameters to ensure they match existing data.
  • Common error messages include 'Operation not implemented' if the operation name is incorrect, or HTTP errors from the API if the session or parameters are invalid.

Links

Discussion