Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(readme): add risk & safe-sending guidance section

Yudhi Armyndharis35b207e0d178
diff --git a/README.md b/README.md
index 6e81e7cdf..7f6dfafcc 100644
--- a/README.md
+++ b/README.md
@@ -33,41 +33,84 @@
Built on a **pluggable architecture**, OpenWA lets you select database engines (SQLite/PostgreSQL), backup/migration storage backends (Local/S3), and cache layers (disabled/Redis) through configuration rather than application-code changes. Message media itself is returned inline to API and webhook consumers; it is not automatically persisted to the storage backend.
-| | |
-| ----------------------------- | ------------------------------------------------------------ |
-| πŸ”“ **100% Open Source** | No licensing fees, no feature locks, full source code access |
-| πŸ—οΈ **Pluggable Architecture** | Swap adapters for database, storage, and cache via config |
-| πŸ–₯️ **Full Dashboard** | Modern React UI for session, webhook, and API key management |
-| πŸ”Ή **Multi-Session Ready** | Run multiple WhatsApp sessions concurrently on one instance |
-| 🐳 **Docker Native** | Production-ready with zero configuration |
-| πŸ”— **n8n Integration** | Community nodes for workflow automation |
+| | |
+| ----------------------------- | ------------------------------------------------------------------------------------------ |
+| πŸ”“ **100% Open Source** | No licensing fees, no feature locks, full source code access |
+| πŸ—οΈ **Pluggable Architecture** | Swap adapters for database, storage, and cache via config |
+| πŸ–₯️ **Full Dashboard** | Modern React UI for session, webhook, and API key management |
+| πŸ”Ή **Multi-Session Ready** | Run multiple WhatsApp sessions concurrently on one instance |
+| 🐳 **Docker Native** | Production-ready with zero configuration |
+| πŸ”— **n8n Integration** | Community nodes for workflow automation |
| 🧩 **Community Adapters** | Third-party integrations (e.g. ioBroker) β€” see [docs](./docs/23-community-integrations.md) |
---
+## ⚠️ Before you connect a number β€” please read
+
+OpenWA is an unofficial, community-maintained gateway. It connects to WhatsApp through **reverse-engineered clients** (the [`whatsapp-web.js`](https://github.com/pedroslopez/whatsapp-web.js) project and [`@whiskeysockets/baileys`](https://github.com/WhiskeySockets/Baileys)), **not** through Meta's official Cloud API. This has real consequences you should understand before you link a phone number.
+
+### What this means in practice
+
+- **There is always a non-zero risk of account restriction or ban.** WhatsApp's anti-abuse systems actively look for unofficial automation. No amount of code quality on our side can make that risk zero.
+- **Pick the right number.** Never connect your primary personal or business number to an automated gateway. Use a **dedicated number** you can afford to lose. If you're running this for paying clients, pass that guidance on to them.
+- **The two engines trade off differently:**
+
+ | Engine | Ban-risk profile | Resource cost |
+ | ----------------- | ------------------------------------------------------------------------------------------------------- | --------------------------------- |
+ | `whatsapp-web.js` | Lower β€” drives a real headless Chromium that looks like genuine WhatsApp Web traffic. | High RAM (~300–500 MB / session). |
+ | `baileys` | Higher β€” speaks the multi-device WebSocket protocol directly and is easier for WhatsApp to fingerprint. | Low RAM (~30–80 MB / session). |
+
+ If account safety is your top priority and you can afford the memory, prefer `whatsapp-web.js`. If you need density and accept the trade-off, use `baileys`.
+
+### Safe-sending guidelines
+
+These are practical guardrails, not guarantees β€” but they materially reduce the chance of WhatsApp flagging the account:
+
+1. **Warm up fresh numbers.** For the first several days, behave like a normal human user: scan the QR, exchange a handful of messages with saved contacts, join a group or two, set a profile photo. Don't blast on day one.
+2. **Don't cold-blast strangers.** Sending the first-ever message to a large batch of numbers that have never messaged you is the single most reliable way to get restricted β€” on either engine.
+3. **Rate-limit yourself.** OpenWA ships with a configurable rate limiter (`RATE_LIMIT_*` env vars). Use it. A few messages per minute per session is sustainable; "thousands in an hour" is not.
+4. **Use opted-in recipients.** The safest workloads are replies and alerts to people who already expect to hear from you (OTP to your own users, order updates, support replies).
+5. **Keep a fallback.** For anything auth-critical or revenue-critical, keep an SMS / email / official-Cloud-API path. Do not bet a login flow solely on an unofficial client.
+6. **Mind the hosting IP.** Cheap datacenter IPs are flagged more aggressively than residential ones. A residential proxy (supported per-session via the proxy settings) can help; it is not a license to spam.
+
+### Known platform behaviour (not bugs)
+
+A few things that look like bugs but are actually server-side WhatsApp policy, not OpenWA defects β€” we track them separately so we can distinguish them from real bugs:
+
+- **First message to a brand-new contact sometimes never arrives.** The API returns success because the message leaves OpenWA, but WhatsApp's server-side reach-out / trust policy drops it at delivery. This is independent of OpenWA. We track it in [#830](https://github.com/rmyndharis/OpenWA/issues/830).
+- **Accounts that get restricted cannot be "unrestricted" by us.** If WhatsApp disables a number, you need to appeal through their channels β€” OpenWA has no lever to pull.
+
+### Compliance
+
+For any deployment where ethical, legal, or regulatory compliance matters (healthcare, finance, large-scale commercial messaging, anything touching end users in the EU/EEA under DMA/GDPR framings), treat OpenWA as **not approved** and use Meta's [official WhatsApp Cloud API](https://developers.facebook.com/docs/whatsapp/cloud-api). OpenWA is an excellent fit for personal projects, internal tooling, automation hobbyists, and learning β€” it is not a drop-in replacement for the official API in regulated environments.
+
+πŸ“– For the deeper, maintainer-side risk analysis (protocol-change exposure, dependency strategy, security posture), see [Risk Management (`docs/16`)](./docs/16-risk-management.md).
+
+---
+
## 🎯 Features
### Core Features
-| Feature | Status | Description |
-| ------------- | ------ | ------------------------------------ |
-| REST API | βœ… | Full WhatsApp API via HTTP endpoints |
-| Multi-Session | βœ… | Manage multiple WhatsApp accounts |
+| Feature | Status | Description |
+| ------------- | ------ | ---------------------------------------------------------------------------- |
+| REST API | βœ… | Full WhatsApp API via HTTP endpoints |
+| Multi-Session | βœ… | Manage multiple WhatsApp accounts |
| Webhooks | βœ… | Real-time events with HMAC signature and optional smart pre-dispatch filters |
-| Web Dashboard | βœ… | Visual management interface |
-| API Key Auth | βœ… | Secure API authentication |
-| Swagger Docs | βœ… | Interactive API documentation |
+| Web Dashboard | βœ… | Visual management interface |
+| API Key Auth | βœ… | Secure API authentication |
+| Swagger Docs | βœ… | Interactive API documentation |
### Messaging
-| Feature | Status | Description |
-| ----------------- | ------ | -------------------------------- |
-| Text Messages | βœ… | Send/receive text messages |
-| Media Messages | βœ… | Images, videos, documents, audio |
-| Message Reactions | βœ… | React to messages with emoji |
+| Feature | Status | Description |
+| ----------------- | ------ | -------------------------------------------- |
+| Text Messages | βœ… | Send/receive text messages |
+| Media Messages | βœ… | Images, videos, documents, audio |
+| Message Reactions | βœ… | React to messages with emoji |
| Message Editing | βœ… | Live `message.edited` events on both engines |
-| Bulk Messaging | βœ… | Send to multiple recipients |
-| Message Status | βœ… | Track delivery and read receipts |
+| Bulk Messaging | βœ… | Send to multiple recipients |
+| Message Status | βœ… | Track delivery and read receipts |
### Advanced
@@ -83,15 +126,15 @@ Built on a **pluggable architecture**, OpenWA lets you select database engines (
### Infrastructure
-| Feature | Status | Description |
-| ---------------- | ------ | ------------------------------ |
-| SQLite | βœ… | Zero-config embedded database |
-| PostgreSQL | βœ… | Production-grade database |
-| Redis Cache | βœ… | Optional performance caching |
+| Feature | Status | Description |
+| ---------------- | ------ | ---------------------------------------- |
+| SQLite | βœ… | Zero-config embedded database |
+| PostgreSQL | βœ… | Production-grade database |
+| Redis Cache | βœ… | Optional performance caching |
| S3/MinIO Storage | βœ… | Media-directory backup/migration backend |
-| Docker | βœ… | One-command deployment |
-| Health Checks | βœ… | Kubernetes-ready probes |
-| Data Migration | βœ… | Export/import between backends |
+| Docker | βœ… | One-command deployment |
+| Health Checks | βœ… | Kubernetes-ready probes |
+| Data Migration | βœ… | Export/import between backends |
---
@@ -206,15 +249,16 @@ docker compose --profile full up -d
> - Production (`docker-compose.yml`): Configurable database, profiles for optional services
>
> Official GHCR images are published as multi-arch manifests for:
+>
> - `linux/amd64`
> - `linux/arm64`
## πŸ”Œ Ports
-| Service | Port | Description |
-| --------------- | --------------- | --------------------------------------------- |
-| API & Dashboard | `2785` | REST API + bundled web dashboard (same port) |
-| Swagger | `2785/api/docs` | Interactive API docs |
+| Service | Port | Description |
+| --------------- | --------------- | ----------------------------------------------- |
+| API & Dashboard | `2785` | REST API + bundled web dashboard (same port) |
+| Swagger | `2785/api/docs` | Interactive API docs |
| Dashboard (dev) | `2886` | Vite dev server with hot reload (`npm run dev`) |
---
@@ -311,17 +355,17 @@ The key can be passed as `Authorization: Bearer …` or `X-API-Key: …`. Every
## πŸ›  Tech Stack
-| Layer | Technology |
-| ------------- | ----------------------- |
-| **Runtime** | Node.js 22 LTS |
-| **Framework** | NestJS 11.x |
-| **Language** | TypeScript 5.x |
+| Layer | Technology |
+| ------------- | ------------------------------------------------------- |
+| **Runtime** | Node.js 22 LTS |
+| **Framework** | NestJS 11.x |
+| **Language** | TypeScript 5.x |
| **WA Engine** | whatsapp-web.js (default) / baileys β€” set `ENGINE_TYPE` |
-| **Database** | SQLite / PostgreSQL |
-| **Cache** | Redis (optional) |
-| **Storage** | Local / S3 / MinIO |
-| **ORM** | TypeORM |
-| **Container** | Docker + Docker Compose |
+| **Database** | SQLite / PostgreSQL |
+| **Cache** | Redis (optional) |
+| **Storage** | Local / S3 / MinIO |
+| **ORM** | TypeORM |
+| **Container** | Docker + Docker Compose |
---