Skip to content
DoveMesh
Docs menu

Authentication

Authenticate WhatsApp Business API requests with your DoveMesh API key in the apikey header, and keep your keys safe on your server.

Every request needs your API key in the apikey header:

bash

-H "apikey: dm_live_..."

API keys belong to your DoveMesh team. Create and revoke them under API keys on the Developers page of the dashboard. When you create a key, choose under Numbers the WhatsApp number it works for, or all numbers. The number in each request (its phone_number_id or waba_id) must be one the key works for. A key works for a number while that number's WhatsApp API plan is active.

A new key works within a minute, and a revoked one stops working within a minute.

Keep your keys secret. Anyone with a key can message your customers as your business and use your message credit.

  • Use keys only on your server. Never put one in a website, mobile app or public code repository.
  • If a key leaks, revoke it on the dashboard straight away and create a new one.
  • Use a separate key for each system, so you can revoke one without stopping the others.
  • Give a system a key for only the number it needs.

Requests without a valid key fail with HTTP 401 and the error invalid_api_key.