# WATI setup for PopMCP

You end up pasting a Wati Bearer API token, and optionally the API endpoint URL that carries your numeric tenant id.

- Auth: API credentials
- Setup time: 4 min
- API base URL: https://live-mt-server.wati.io/{tenantId}/api/v1
- Credentials screen: https://live.wati.io/
- Provider docs: https://docs.wati.io/reference/introduction

## Before you begin

- A Wati account on the Growth, Pro or Business plan, since API access is not available on the trial-only tiers
- Admin access to the Wati dashboard so you can create tokens
- Some endpoints are plan-gated. /assignTeam, /updateChatStatus, /chatbots and /createCustomSegment need Pro, and /updateContactAttributesForMultiContacts needs Business

## Get your credentials

### 1. Open Connector → API in the Wati dashboard

Sign in at `live.wati.io` and open Connector → API. Existing tokens are listed on the API Tokens page.

Screen: https://live.wati.io/

### 2. Generate a token with the scopes you need

Click Generate new token and name it `PopMCP`. Tick `contacts:read`, `contacts:write` and `messagetemplate:read`, plus the send scopes if PopMCP should send templates and run broadcasts.

Screen: https://docs.wati.io/reference/authentication

### 3. Copy the token into PopMCP

Copy the token from the dialog and paste it into PopMCP's Access token field. Copy it before closing the dialog, because Wati shows the value once.

Screen: https://docs.wati.io/reference/authentication

### 4. Copy your API endpoint URL (optional)

Click API Docs in the navigation menu and copy the API Endpoint URL. Paste it into PopMCP's API endpoint URL field.

Screen: https://docs.wati.io/docs

## Fields PopMCP asks for

- Access token (accessToken) [required]: WATI dashboard → top nav API Docs (it shows your Bearer token), or the newer Connector → API → Create API Token (give it a name, pick scopes, and copy it; it's shown only once). Stored encrypted.
- API endpoint URL (optional) (apiEndpoint): Shown right next to the token on the WATI API Docs page. It contains your numeric tenant id (the /123456/ part). Only needed for the legacy v1/v2 operations (template authoring, WABA/phone management, webhooks); modern v3 operations work from the token alone.

## Verify

PopMCP shows the WATI connector as Connected and can list your WhatsApp contacts. A successful call returns HTTP 200, which means Wati accepted the message rather than delivered it, since delivery arrives by webhook.

## Troubleshooting

### 401 Unauthorized

Cause: Wati documents 401 as "No valid API key provided." Usually a truncated paste, or a token that has expired or been rotated.

Fix: Generate a fresh token under Connector → API and paste the whole value, without the word Bearer.

### 403 Forbidden

Cause: Wati documents 403 as "The API key doesn't have permissions to perform the request."

Fix: Re-create the token with the missing scope ticked, or upgrade the plan if the endpoint is Pro or Business only.

### The token was lost before it was copied

Cause: Wati displays a token value once, at creation.

Fix: Generate a replacement token under Connector → API, or call POST /api/v1/rotateToken, then delete the old token.

### 404 Not Found on legacy v1 calls

Cause: The API endpoint URL is missing or carries the wrong tenant id segment.

Fix: Copy the API Endpoint URL exactly as shown on the API Docs screen, including the /123456/ tenant segment.

### 429 Too Many Requests

Cause: Wati rate-limits per 10-second window and per plan.

Fix: Slow the calls down, since contact and message reads are capped at 10 requests per 10 seconds on every plan. Wati invites customers to "reach out to us about your use case" for higher limits.

---

Source: https://www.docs.popmcp.com/docs/integrations/wati/