GOWA - WhatsApp REST API with support for UI, Multi Account, Webhooks, and MCP, and Chatwoot. Built with Golang for efficient memory use.
Go botgogolanggolang-whatsappgolang-whatsapp-apirestrest-apiwhatsappwhatsapp-apiwhatsapp-api-gowhatsapp-multi-devicewhatsapp-web-multi-device
# Application Settings
APP_PORT=3000
APP_HOST=0.0.0.0
APP_DEBUG=false
APP_OS=Chrome
APP_BASIC_AUTH=user1:pass1,user2:pass2
# Empty APP_BASIC_AUTH refuses to start when APP_HOST is not loopback (the
# default 0.0.0.0). Loopback binds stay open for local development. Set this
# only when a reverse proxy authenticates clients before they reach GOWA.
APP_ALLOW_UNAUTHENTICATED=false
# Browser origins allowed to perform state-changing requests, in addition to
# the request's own host and any specific APP_CORS_ALLOWED_ORIGINS. A CORS
# wildcard does not permit cross-site mutations. Example:
# APP_TRUSTED_ORIGINS=https://ui.example.com
APP_TRUSTED_ORIGINS=
APP_BASE_PATH=
APP_TRUSTED_PROXIES=0.0.0.0/0
# Restrict cross-origin browser access to specific origins (comma-separated); empty allows any origin
APP_CORS_ALLOWED_ORIGINS=
# Web UI (gowa-ui) Settings
# The dashboard is downloaded from the latest GitHub release of APP_UI_REPO
# and served at "/". Air-gap: pre-seed storages/ui/index.html and set
# APP_UI_AUTO_UPDATE=false, or turn the UI off entirely.
APP_UI_ENABLED=true
APP_UI_AUTO_UPDATE=true
APP_UI_REPO=aldinokemal/gowa-ui
APP_UI_ASSET_NAME=gowa-ui.html
APP_UI_UPDATE_INTERVAL=3h
APP_UI_GITHUB_TOKEN=
# Optional supply-chain pin: refuse any dashboard whose sha256 differs
# (hex digest; each release ships a gowa-ui.html.sha256 asset)
APP_UI_ASSET_SHA256=
# MCP / OAuth Settings
MCP_ENABLED=true
# OAuth is opt-in. It reuses APP_BASIC_AUTH accounts for the browser login and
# lets /mcp accept OAuth Bearer tokens in addition to existing Basic Auth.
MCP_OAUTH_ENABLED=false
# Public HTTPS authorization-server issuer. Required when MCP_OAUTH_ENABLED=true.
# Include APP_BASE_PATH when OAuth endpoints are also exposed under that path,
# e.g. https://gowa.example.com/gowa.
MCP_OAUTH_ISSUER_URL=
# Optional canonical public MCP URL. When empty it is derived from the issuer
# origin + APP_BASE_PATH + /mcp.
MCP_OAUTH_RESOURCE_URL=
# Dedicated OAuth SQLite state; clients, codes, and token hashes only.
MCP_OAUTH_DB_URI=file:storages/oauth.db
# Database Settings
# SQLite session files are created with owner-only permissions.
# A PostgreSQL DB_URI or DB_KEYS_URI that omits sslmode uses sslmode=verify-full
# for the host lib/pq will dial (URL host, host, hostaddr, PGHOST, PGHOSTADDR).
# localhost, 127.0.0.1, ::1, and unix sockets use sslmode=disable. A blank
# sslmode is ignored. Set a non-empty sslmode in the URI to override.
# An sslmode from PGSSLMODE or a PGSERVICE entry (PGSERVICEFILE selects the
# file) is kept as is; a service entry's host and sslmode override the URI.
DB_URI=file:storages/whatsapp.db?_foreign_keys=on
DB_KEYS_URI=
# Max concurrent SQLite connections for chat storage (default: 5, min: 1).
# Increase if API sends time out under heavy incoming message load.
CHAT_STORAGE_MAX_OPEN_CONNS=5
# WhatsApp Settings
WHATSAPP_AUTO_REPLY="Auto reply message"
WHATSAPP_AUTO_MARK_READ=false
WHATSAPP_AUTO_REJECT_CALL=false
WHATSAPP_AUTO_DOWNLOAD_MEDIA=true
WHATSAPP_IGNORE_STATUS_MEDIA=false
WHATSAPP_WEBHOOK=https://webhook.site/07b69616-5943-4c7f-a8be-db4819df699e,https://webhook.site/09a38aff-d11a-4a38-a176-3f3efa0b5e8b
# HMAC key for X-Hub-Signature-256; generate one with `openssl rand -hex 32`.
# The published values "secret", "super-secret-key" and "your-private-key" are
# rejected. When this is empty, the process generates a random key that changes
# on restart; set a stable secret before receivers verify signatures.
WHATSAPP_WEBHOOK_SECRET=
WHATSAPP_WEBHOOK_INSECURE_SKIP_VERIFY=false
WHATSAPP_WEBHOOK_EVENTS=message,message.reaction,message.revoked,message.edited,message.ack,message.deleted,group.participants
# Comma-separated WhatsApp JIDs (or "@g.us"/"@s.whatsapp.net"/"@lid" wildcards) to skip when forwarding to the webhook.
# Example: "@g.us" drops all group traffic; add exact JIDs to mute specific chats/senders.
WHATSAPP_WEBHOOK_IGNORE_JIDS=
# When a device has its own webhook (PATCH /devices/:id/webhook), also deliver its events to the global WHATSAPP_WEBHOOK URLs.
WHATSAPP_WEBHOOK_DEVICE_MERGE_GLOBAL=false
WHATSAPP_WEBHOOK_INCLUDE_OUTGOING=false
WHATSAPP_ACCOUNT_VALIDATION=true
WHATSAPP_PRESENCE_ON_CONNECT=unavailable
WHATSAPP_PRESENCE_PULSE_ENABLED=true
WHATSAPP_PRESENCE_PULSE_INTERVAL=24h
WHATSAPP_PRESENCE_PULSE_DURATION=5m
WHATSAPP_CHAT_STORAGE=true
# Outbound proxy applied to whatsmeow's WebSocket dialer via SetProxyAddress.
# Standard HTTP_PROXY env does not apply to the underlying ws connection.
# Useful for self-hosted deploys behind DPI / network egress restrictions.
# Supports SOCKS5/HTTP/HTTPS schemes. Empty = direct connection.
# Example: WHATSAPP_PROXY=socks5://user:[email protected]:1080
WHATSAPP_PROXY=
# Media, document, and link-preview URLs passed to the send API are fetched
# directly, without HTTP(S)_PROXY, so the private-address check applies to the
# address that is actually dialed.
# Chatwoot Integration
CHATWOOT_ENABLED=false
CHATWOOT_URL=https://app.chatwoot.com
CHATWOOT_API_TOKEN=xxxxxxxx
CHATWOOT_ACCOUNT_ID=111111
CHATWOOT_INBOX_ID=000000
CHATWOOT_DEVICE_ID=
CHATWOOT_IMPORT_MESSAGES=false
CHATWOOT_DAYS_LIMIT_IMPORT_MESSAGES=3
CHATWOOT_IMPORT_DB_URI=
CHATWOOT_IMPORT_PLACEHOLDER_MEDIA_MESSAGE=true
CHATWOOT_IMPORT_MEDIA_WITH_REST=false
# Auto-provisioning: create/reuse the inbox on startup so CHATWOOT_INBOX_ID is optional
CHATWOOT_AUTO_CREATE=false
CHATWOOT_INBOX_NAME=WhatsApp
CHATWOOT_WEBHOOK_URL=
# The API channel's webhook secret: GOWA then verifies Chatwoot's X-Chatwoot-Signature.
# Keep the secret out of CHATWOOT_WEBHOOK_URL (no ?secret=...): URLs end up in logs.
# An empty secret rejects webhook calls. Set the next flag only for a trusted
# local network that cannot sign requests.
CHATWOOT_WEBHOOK_SECRET=
CHATWOOT_WEBHOOK_ALLOW_UNSIGNED=false
CHATWOOT_WEBHOOK_SIGNATURE_TOLERANCE=5m
# Conversation handling
CHATWOOT_REOPEN_CONVERSATION=true
CHATWOOT_CONVERSATION_PENDING=false
CHATWOOT_IGNORE_JIDS=
# Outbound agent signature
CHATWOOT_SIGN_MSG=false
CHATWOOT_SIGN_DELIMITER="\n\n"
# Edit/delete propagation (WhatsApp -> Chatwoot)
CHATWOOT_FORWARD_EDITS=true
CHATWOOT_FORWARD_DELETES=true
# Evolution-compatible read/delete state sync
CHATWOOT_MESSAGE_READ=false
CHATWOOT_MESSAGE_DELETE=false