WhatsApp Web API (WWebJS) icon

WhatsApp Web API (WWebJS)

Interact with WhatsApp Web API via WWebJS — send messages, manage sessions, chats, groups, contacts and channels

Chat → Fetch Messages

AI-generated

Summary

Fetch messages from a WhatsApp chat

Inputs

  • sessionId (required) — Session identifier. Select from the list or use an expression. Falls back to credentials default if empty.
  • chatId (required) — Unique WhatsApp ID for the chat
  • searchOptions — Optional fetch options for limiting or filtering results

Output shape

array

Array of Message objects sorted earliest → latest. Each message contains id, body, type, timestamp, from, to, fromMe, hasMedia, etc. API response adds success and messages fields.

Links

Discussion