What is an access token?
An access token is the credential your server presents to Meta's Graph API with every WhatsApp Cloud API request, whether it sends a message, creates a template or reads a phone number's quality rating. It travels in the HTTP header Authorization: Bearer {ACCESS_TOKEN} and tells Meta three things at once: which Meta app is calling, which identity the app is acting for (a person, a system user or an onboarded business), and which permissions that identity has granted. Meta asks developers to treat the string as opaque: do not parse it or assume anything about its format or length.
There are several kinds, and choosing the right one is most of the work. A user access token belongs to a logged-in person and expires within an hour or two, or after about 60 days once exchanged for a long-lived token. A system user access token belongs to a non-human system user in a business portfolio and can be generated without an expiry, which makes it the standard credential for a business's own servers. A business integration system user access token is what a Tech Provider receives through Embedded Signup for one customer's assets. An app access token ({APP_ID}|{APP_SECRET}) identifies the app itself and is used for app-level calls such as debug_token.
A token is only as useful as its scopes and assets. Scopes are API permissions: whatsapp_business_messaging to send and receive, whatsapp_business_management for templates, phone numbers and WABA settings, and occasionally business_management for the portfolio. Assets are the specific WhatsApp Business Accounts the token has been granted. When a call fails, the real question is rarely "is the token valid?" and usually "does this token hold this permission on this WABA?". The Access Token Debugger answers both.
Key takeaways
- An access token is the opaque bearer credential Meta checks on every Graph API call: which app, which identity and which permissions.
- Send it as
Authorization: Bearer {ACCESS_TOKEN}from your server only, never from a browser, a mobile app or a public repository. - User tokens last hours (about 60 days once extended); system user and business tokens can be set never to expire, so production uses those.
- A valid token is not enough: it needs the right permission on the specific WABA, or calls fail with error 10, 100 or 200.
- Expired or revoked tokens return error 190. Check any token's owner, scopes and expiry with the debug_token endpoint.
Which token type fits the job?
| Acts as | Lifetime | Typical use | Production sending? | |
|---|---|---|---|---|
| User token (short-lived) | ||||
| Long-lived user token | ||||
| System user token | ||||
| Business integration token | ||||
| App access token |
Hover, tap or arrow-key through the cells — a dot in the corner means there is a note.
App access token by Acts as
The app itselfApp-level
Formed as {APP_ID}|{APP_SECRET}. It contains your app secret, so it is strictly server-side.
Legend — press one to highlight its cells
Row 5 of 5. App access token × Acts as: The app itself. Formed as {APP_ID}|{APP_SECRET}. It contains your app secret, so it is strictly server-side.
How does InfiQ help with an access token?
With InfiQ you never paste a Meta access token into your code. InfiQ holds the token issued when you connected WhatsApp, and your server sends an InfiQ API key in the X-INFIQ-API-KEY header.
- Keys are scoped, and you can rotate or revoke them.
- Every InfiQ response carries an InfiQ_traceid for support.
Key facts at a glance
An access token: key facts and limits
- Header
- Authorization: Bearer {ACCESS_TOKEN}
- User token lifetime
- About 1–2 hours (API Setup token ~24 h); about 60 days if extended
- System user token
- Expiry chosen at generation (can be never)
- Business token (Embedded Signup)
- Per your Login for Business setting; one per customer
- Core WhatsApp scopes
- whatsapp_business_messaging, whatsapp_business_management
- Expired or revoked
- Error 190 (OAuthException)
- Inspect a token
- GET /debug_token?input_token={TOKEN}
How does an access token work?
Pick the identity
For your own business, create a system user in Business Settings. As a Tech Provider, use the business token each customer grants through Embedded Signup. Keep user tokens for testing in the App Dashboard or the Graph API Explorer.
Grant permissions and assets
When generating a system user token you choose the app, the permissions (usually
whatsapp_business_messagingandwhatsapp_business_management) and an expiry preference. The system user must also be assigned the WABA it will act on.Store it as a secret
Keep the token in a secrets manager or an encrypted environment variable on the server. Only backend code should ever read it, and it should never appear in logs.
Send it on every call
Add
Authorization: Bearer {ACCESS_TOKEN}to each request tograph.facebook.com. Optionally addappsecret_proof, an HMAC-SHA256 of the token keyed with your app secret, so a stolen token alone is not enough.Watch for error 190 and rotate
Error 190 means the token expired or was revoked. Alert on it, keep a written rotation procedure, and revoke any token that may have leaked straight away.
An access token in code
curl -X POST "https://api.infiq.in/v1/messages" \-H "X-INFIQ-API-KEY: {INFIQ_API_KEY}" \-H "Content-Type: application/json" \-d '{"messaging_product": "whatsapp","to": "919812345678","type": "template","template": { "name": "order_confirmed", "language": { "code": "en" } }}'
The token goes in the Authorization header as a bearer token on every request.
Why does an access token matter?
Every WhatsApp integration stops when its token does. A personal token that expires on a Friday night halts OTPs and order updates until someone notices; a token pasted into a frontend bundle lets anyone send messages billed to your account; a token missing one scope breaks template sync while sending still works, which is harder to diagnose than a total outage. Getting the token type, storage and scopes right once removes a whole class of production incidents.
Example: Moving a Surat textile wholesaler off a personal token
A Surat wholesaler's developer launched WhatsApp order confirmations using the temporary token from the App Dashboard's API Setup panel. It worked for the demo and failed the next morning with error 190. The fix took an hour: the team created a system user in Business Settings, assigned it the WABA with full control, generated a non-expiring token with whatsapp_business_messaging and whatsapp_business_management, stored it in the server's secrets manager and checked it with debug_token — expires_at 0, both scopes, and the right WABA ID in granular_scopes. Confirmations have not stopped since, and the token is rotated every quarter.
Common wrong turns
Common mistakes with an access token
Shipping the temporary API Setup token
The token on the App Dashboard's API Setup panel is a temporary token meant for testing and expires after about 24 hours. Production needs a system user token, or business tokens for customers you onboard.
Putting the token where people can read it
Tokens in JavaScript bundles, mobile apps, shared Postman collections or Git history can be used by anyone to send messages billed to you. Keep it server-side and scan repositories for leaked secrets.
Granting every permission just in case
Extra scopes widen the damage a leak can do and can slow App Review. Grant only the permissions and WABAs the integration actually calls.
Reading every auth error as an expired token
Error 190 is an invalid token; codes 10 and 200–299 mean a valid token without the permission; code 100 with subcode 33 often means the token cannot see that object. Check which before regenerating anything.
No owner for rotation
A non-expiring token that nobody rotates stays valid after staff leave or a laptop is lost. Record who may generate tokens, and rotate on a schedule and after every suspected leak.
Good practice
Best practices for an access token
- Name system users after the service that uses them ("orders-api-prod") so a revoke never hits the wrong integration.
- Use one token per environment and per service, so revoking staging never breaks production.
- Turn on the app's "Require app secret" setting once every caller sends
appsecret_proof. - Run a daily
debug_tokencheck on production tokens and alert ifis_validturns false or a scope disappears.