# Wapiworld authentication

> Canonical authentication guide for the REST API and MCP. Updated 2026-08-25.

## REST API keys

Create a key in the dashboard. Each API key is pinned to one project and carries explicit per-resource scopes such as `instances:read` or `instances:write`. Send only the secret as HTTP Basic credentials using `Authorization: Basic base64(<key secret>)`. Do not expose it in prompts, URLs, logs, webhook payloads, or tool output.

## MCP OAuth

Connect to https://mcp.wapiworld.com/mcp. Discover protected-resource metadata at https://app.wapiworld.com/.well-known/oauth-protected-resource and authorization-server metadata at https://api.authrice.com/.well-known/oauth-authorization-server. Public clients use Authorization Code with PKCE and exact HTTPS redirect URIs.

## Scopes

- `wapiworld:read` reads safe project, sender, status, recording-policy, and sanitized webhook information.
- `wapiworld:write` permits one explicitly confirmed message send.

## Errors and revocation

A 401 means the credential is absent, invalid, expired, or revoked. A 403 means the granted scope cannot perform the operation. Revoke OAuth access from connected-app settings or delete an API key in the dashboard, then stop using the credential immediately.

## Safety boundary

The public MCP never returns recorded message bodies, previews, sender names, contact or chat identifiers, WhatsApp message identifiers, QR pairing data, API keys, instance secrets, proxy credentials, webhook signing secrets, complete webhook URLs, or raw provider errors.

`send_message` is destructive, open-world, and non-idempotent. Show the exact sender, recipient, and complete text; warn that recording settings may persist the text; obtain explicit confirmation for exactly one send; call once; and never automatically retry an uncertain outcome. Transport acceptance is not proof of delivery or reading.
