orvachat

Authentication

How to Authenticate API Requests

Every request needs an API key for one number, sent as a Bearer token.

Every request needs an API key. A key belongs to one WhatsApp number, so the key also tells us which number to use. You don't send a number id.

Create a key

  • Open the Developer API page, pick the number and create a key.
  • Keys start with wa_live_. The full key is shown only once. Copy it right away.
  • Each number can have up to 5 active keys, for example one per app. Revoke a key there and it stops working at once.

Send the key

Put it in the Authorization header of every request, after the word Bearer:

Authorization: Bearer wa_live_…
cURL
curl "https://orvachat.com/api/v1/session/status" \
  -H "Authorization: Bearer YOUR_API_KEY"

Important

Keep keys on your server. Never put a key in a website, mobile app or anything other people can open. Anyone with the key can send messages from your number.

Key errors

CodeMessage
401Invalid or revoked API key
403This is an account key. Create a key for a WhatsApp number on the Developer API page.
403Account suspended
403Developer API is off for this number. Switch the number to Developer API mode in your orvachat dashboard.

See all errors on Error Responses.