Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(api): note that REST routes accept the key as a Bearer token

Yudhi Armyndharis315a0c1ad0e7
diff --git a/docs/06-api-specification.md b/docs/06-api-specification.md
index c8c9671cb..b28fca048 100644
--- a/docs/06-api-specification.md
+++ b/docs/06-api-specification.md
@@ -20,9 +20,9 @@ A global API-key guard protects every route unless it is explicitly marked **pub
X-API-Key: owa_k1_your-api-key-here
```
-> **Auth is header-only (never in a URL).** A query-parameter API key is **not** accepted anywhere. REST routes take the key via the `X-API-Key` header; the WebSocket (Socket.IO) handshake — see §6.5 Real-time API — accepts it via the handshake `auth.apiKey` field or the `X-API-Key` header. The former `?apiKey=` query fallback was **removed** (it leaked the credential into proxy/access logs). Never put the key in a URL.
+> **Auth is header-only (never in a URL).** A query-parameter API key is **not** accepted anywhere. REST routes take the key via the `X-API-Key` header or `Authorization: Bearer <key>` (`X-API-Key` wins when both are sent); the WebSocket (Socket.IO) handshake — see §6.5 Real-time API — accepts it only via the handshake `auth.apiKey` field or the `X-API-Key` header. The former `?apiKey=` query fallback was **removed** (it leaked the credential into proxy/access logs). Never put the key in a URL.
-The metrics endpoint is the lone exception to the API-key scheme: it authenticates with `Authorization: Bearer <METRICS_TOKEN>` instead of `X-API-Key`.
+The metrics endpoint is the lone exception to the API-key scheme: it takes no API key and authenticates with `Authorization: Bearer <METRICS_TOKEN>` instead.
### Common Headers