Walytic icon

Walytic

Interact with the Walytic WhatsApp automation platform

Message → Get Chat History

AI-generated

Summary

Retrieve paginated WhatsApp chat history messages exchanged with a specific contact for a given session.

Inputs

  • Session ID (required) — WhatsApp phone number in E.164 digits without the + sign (e.g., 919876543210) identifying the session.
  • Counterparty Number (required) — Phone number in E.164 digits of the contact whose chat history you want to fetch.
  • Limit — Maximum number of messages to return in the response (default is 50).
  • Before (Cursor) — Pagination cursor from the previous response to fetch messages before that point.

Output shape

a list of chat message objects representing the chat history with the specified contact within the given session.

Supports pagination using the 'Limit' and 'Before (Cursor)' parameters. Messages are returned as an array under the response data. The output is paired with the input item index.

Examples

Example 1: Retrieve the last 50 chat messages with a contact in a specific WhatsApp session.

Set 'Session ID' to the WhatsApp phone number string without the +, 'Counterparty Number' to the contact's phone number, and optionally adjust 'Limit' or 'Before (Cursor)' for pagination.

Links

Discussion