Skip to main content
GOWA offers two ways to receive messages:

Webhooks

Start GOWA with a webhook URL and secret:
A text message arrives as:
In a group, chat_id is the group JID (...@g.us) and from is the member who sent it.

Example: auto-reply bot

Verify the signature, acknowledge, then reply through the API with the same device:
For a fixed reply to every message, WHATSAPP_AUTO_REPLY="We'll get back to you soon" does this without any code. See Webhooks for every event type, media fields, retries and per-device URLs.

Chat storage API

GOWA records chats and messages for each slot in its local chat storage. Query it per device:
Only messages GOWA has seen (received while connected, or delivered by WhatsApp’s history sync) are available. To ask the phone for older history in a chat, call POST /chat/{chat_jid}/history with {"count": 50}; the messages arrive asynchronously. Polling is suitable for catch-up and inbox views. For bots and automations, use webhooks.

Downloading media

With auto-download on (default), the webhook gives a path under statics/media/, served at http://localhost:3000/statics/media/<file>. Otherwise fetch the media on demand:

Read receipts

Mark a message read (blue ticks) with POST /message/{message_id}/read and {"phone": "<chat_jid>"}, or set WHATSAPP_AUTO_MARK_READ=true to mark every incoming message read automatically.