# How to get a WhatsApp API key: Meta access tokens and scoped keys

How to get a WhatsApp API key: create a Meta access token for the Cloud API step by step, or a scoped SuperSkope key, and keep either one safe.

Canonical URL: https://superskope.com/blog/whatsapp-api-key
Updated: 2026-11-27
Author: SuperSkope

## Short answer

For Meta’s official WhatsApp Cloud API, your “API key” is a Meta access token: generate a temporary one in the App Dashboard’s API Setup panel, then create a long-lived system user token in Business settings with the whatsapp_business_messaging, whatsapp_business_management and business_management permissions.

Tokens are free. Keep them on your server and grant the narrowest access that works.

## What is a WhatsApp API key?

On Meta’s official WhatsApp Cloud API, there is no separate “API key”. You authenticate with a Meta access token, sent as a bearer token in the Authorization header, together with your business phone number ID. Providers and unofficial APIs issue their own keys, which work the same way: a secret string your server sends with each request.

Getting a token takes minutes. Getting the right kind of token, with only the permissions you need, stored where it cannot leak, is what matters for production.

| Credential | Lifetime | Use it for |
| --- | --- | --- |
| Meta user access token (App Dashboard) | Short-lived; expires within hours | First tests from the API Setup panel |
| Meta system user access token | Long-lived; you choose the expiry when generating it | Your own production server |
| Meta business integration system user token | Per onboarded customer | Tech providers and solution partners using embedded signup |
| Provider API key | Set by the provider | Calling a BSP’s own API |
| SuperSkope scoped key | 1 to 365 days, 90 by default | Your backend or agent calling SuperSkope’s API for one linked number |

## How to get a temporary WhatsApp token from Meta



1. Register as a Meta developer at developers.facebook.com if you have not already.
2. In the App Dashboard, create an app and choose the “Connect with customers through WhatsApp” use case. Select or create a business portfolio.
3. Open the use case’s API Setup panel and connect a Messaging account. Meta creates a test WhatsApp account, Messaging account and test phone number.
4. Click Generate access token. Copy the phone number ID and Messaging account ID shown on the same panel.
5. Add your own phone as a recipient and send the hello_world template to confirm the token works.

> Meta’s documentation says user access tokens expire quickly, so you would have to keep generating new ones every few hours. Do not build production on them.

## How to get a permanent WhatsApp API token (system user)

For a server that sends messages without anyone signed in, Meta recommends a system user access token. System users belong to your business portfolio, not to a person, so the token survives staff changes.

1. Open Meta Business Suite, then Business settings, then System users.
2. Add a system user. Choose Admin for access to every WhatsApp and Messaging account in the portfolio, or Employee and grant access to specific accounts. An employee system user needs access to both the WhatsApp account and the Messaging account.
3. Assign your app to the system user with the Manage app permission.
4. Click Generate token, select the app, choose an expiration, and grant three permissions: business_management, whatsapp_business_management and whatsapp_business_messaging.
5. Copy the token once into your server’s secret store. Use it as Authorization: Bearer <token> on graph.facebook.com requests.

```
# Check that the token can read your number (official Cloud API)
curl "https://graph.facebook.com/v27.0/$PHONE_NUMBER_ID?fields=verified_name,quality_rating" \
  -H "Authorization: Bearer $WHATSAPP_TOKEN"
```

Copy-only example. No request is run by this page.

- [WhatsApp Cloud API explained](https://superskope.com/blog/whatsapp-cloud-api)

## How to get a SuperSkope API key

SuperSkope keys belong to one linked WhatsApp number and are limited by the owner to exact conversations and actions. SuperSkope connects your existing number as a WhatsApp linked device, the same way WhatsApp Web works. It is not the official WhatsApp Business Platform and is not affiliated with WhatsApp or Meta.

1. Link and confirm your WhatsApp number in the SuperSkope workspace.
2. As an owner, open Developer and create a key with a clear name, such as “dispatch backend”.
3. Choose an expiry between 1 and 365 days. The default is 90.
4. Select up to 100 exact conversations the key may use, and the permissions it needs. Start with status:read, chats:read, messages:read and events:read; add messages:write only when your approval flow is ready.
5. Copy the secret once into your backend’s secret store. SuperSkope stores only a hash and cannot show it again.

```
# SuperSkope customer API: a read-only first call
curl "https://api.superskope.com/api/v1/status" \
  -H "Authorization: Bearer $SUPERSKOPE_API_KEY"
```

Copy-only example. No request is run by this page.

- [Give an AI agent narrow WhatsApp permissions](https://superskope.com/blog/scoped-whatsapp-agent-permissions)
- [Read the developer documentation](https://docs.superskope.com/)

## How to keep a WhatsApp API key safe



- Keep it on the server. Never put a token in a mobile app, website JavaScript, a URL, a shared spreadsheet or an AI model prompt.
- Use the narrowest scope. A Meta employee system user with access to one account is safer than an admin; a SuperSkope key with three conversations is safer than one with a hundred.
- Set an expiry and rotate. Create the replacement, deploy it, then revoke the old one.
- Log usage without logging the secret. SuperSkope’s request logs record the route, status and request key, never the bearer secret.
- Never replay unresolved sends with a new key. On SuperSkope, rotating a key starts a new idempotency namespace, so check the old request first.
- Protect your webhook too. A leaked app secret lets someone forge Meta webhook signatures.

## Troubleshooting token errors



| Symptom | Likely cause | Fix |
| --- | --- | --- |
| Error code 190 or “session has expired” | User access token expired | Switch to a system user token |
| Error code 200 (permission) | System user lacks access to the account | Grant the system user access to both the WhatsApp account and the Messaging account |
| Error code 10 or missing permission | Token generated without whatsapp_business_messaging | Generate a new token with all three permissions |
| SuperSkope 401 | Key revoked, expired, or its issuing owner was removed | Create a new key and update the integration |
| SuperSkope 403 | Key lacks the scope or the conversation | Ask the owner to add that permission or conversation |

## Next step

Generate a system user token, store it in your secret manager, and make one read call before you send anything. If you work in existing groups and chats on a regular number, create a read-only SuperSkope key first and add write permissions later.

- [Send a WhatsApp message with an API](https://superskope.com/blog/whatsapp-api-send-message)
- [WhatsApp bot and API in Python](https://superskope.com/blog/whatsapp-api-python)
- [WhatsApp API in Node.js and TypeScript](https://superskope.com/blog/whatsapp-api-nodejs)

## Frequently asked questions

**Is a WhatsApp API key free?** Yes. Meta does not charge for access tokens or API access. You pay for delivered business messages. Provider keys come with the provider’s plan, and SuperSkope keys are included in every workspace, including during the free trial.

**Where do I find my WhatsApp phone number ID?** In the App Dashboard, open your app’s WhatsApp use case and the API Setup panel. It lists the phone number ID and Messaging account ID for the test number and any number you add. The phone number ID is not the phone number itself.

**Does a WhatsApp access token expire?** User access tokens from the API Setup panel expire within hours. System user tokens are long-lived, and you choose the expiration when you generate them. Rotate any token you suspect has leaked, and use separate tokens for separate systems.

**Can I get a WhatsApp API key without a business?** You can test with Meta’s test number using just a developer account and a business portfolio. To message real customers at scale you need a registered business number, a payment method and usually business verification. Unofficial APIs give keys without any of this, but they are not authorised by WhatsApp.

## Sources



- [Meta: Access tokens guide](https://developers.facebook.com/documentation/business-messaging/whatsapp/access-tokens)
- [Meta: Cloud API get started](https://developers.facebook.com/documentation/business-messaging/whatsapp/get-started)
- [Meta: WhatsApp accounts and Messaging accounts](https://developers.facebook.com/documentation/business-messaging/whatsapp/whatsapp-business-accounts)
- [Meta: Create a webhook endpoint](https://developers.facebook.com/documentation/business-messaging/whatsapp/webhooks/create-webhook-endpoint)

## Continue reading

- [Give an AI agent WhatsApp access without giving it everything.](https://superskope.com/blog/scoped-whatsapp-agent-permissions)
- [WhatsApp Cloud API explained: setup, limits, groups and pricing](https://superskope.com/blog/whatsapp-cloud-api)
- [Send a WhatsApp message with an API: Cloud API and SuperSkope examples](https://superskope.com/blog/whatsapp-api-send-message)
