> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chatsyncs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Access Tokens (Temporary vs Permanent)

> The difference between a temporary access token and a permanent system-user token in the WhatsApp Cloud API, and how to generate each. Use when a customer asks why their token expired, how to get a token that doesn't expire, or how to create a system user in Meta Business Manager.

There are two types of access tokens used to authenticate WhatsApp Cloud API calls: a
**temporary token** for testing and a **permanent system-user token** for production. Using
the wrong one is the most common reason API calls suddenly stop working.

## Temporary access token

Generated directly in the Meta developer dashboard under **WhatsApp → API Setup →
"Generate access token"**. It works immediately but expires in about **1 hour**. Use only for
testing — never in production.

## Permanent system-user token

Generated via Meta Business Manager (`business.facebook.com`):

<Steps>
  <Step title="Open Business Settings">
    Go to `business.facebook.com`, open your business portfolio, and click into its **Settings**.
  </Step>

  <Step title="Open System Users">
    Go to **Users → System Users**. A new portfolio starts with no system users.
  </Step>

  <Step title="Create a system user">
    Click **Add**, give it a name, and set its role to **Admin**.
  </Step>

  <Step title="Assign assets to the system user">
    A new system user has no access to anything yet. Use **Assign assets** to give it **full
    control** over both the app and the WhatsApp Business Account — skipping either one causes
    the token to fail for that asset later.
  </Step>

  <Step title="Generate the token">
    Click **Generate token** on that system user, select the app, and assign the required
    permissions (`whatsapp_business_messaging`, `whatsapp_business_management`,
    `whatsapp_business_manage_events`).
  </Step>

  <Step title="Save it immediately">
    Copy the token and store it securely — Meta only shows it once.
  </Step>

  <Step title="Verify it">
    Paste the token into the Meta Access Token Debugger
    (`developers.facebook.com/tools/debug/accesstoken/`) to verify it is valid and check its
    expiry — a permanent token shows "Never" as expiry.
  </Step>
</Steps>

Use the permanent token in all production API calls.

## Walkthrough screenshots

<Frame caption="The API Setup screen showing the Generate access token button.">
  <img src="https://mintcdn.com/chatsyncs/sOr8zsZPH59fQo2F/images/meta-api/concepts/access-tokens/step-01-generate-temp-token.png?fit=max&auto=format&n=sOr8zsZPH59fQo2F&q=85&s=63ad23cfcf24a9a9f336afe613946cc1" alt="Generate temporary access token" width="1708" height="376" data-path="images/meta-api/concepts/access-tokens/step-01-generate-temp-token.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/chatsyncs/vUvX6MCOtxusgHGw/images/meta-api/concepts/access-tokens/step-02-open-business-settings.png?fit=max&auto=format&n=vUvX6MCOtxusgHGw&q=85&s=e2629bfe4cbcadeee03aabbb00cdf9b7" alt="Meta Business Suite — opening a business portfolio's Settings" width="792" height="382" data-path="images/meta-api/concepts/access-tokens/step-02-open-business-settings.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/chatsyncs/vUvX6MCOtxusgHGw/images/meta-api/concepts/access-tokens/step-03-system-users-empty.png?fit=max&auto=format&n=vUvX6MCOtxusgHGw&q=85&s=868c74fdac9addb6e0fdb1f2391e46df" alt="System Users screen with no system users added yet" width="797" height="391" data-path="images/meta-api/concepts/access-tokens/step-03-system-users-empty.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/chatsyncs/vUvX6MCOtxusgHGw/images/meta-api/concepts/access-tokens/step-04-create-system-user-modal.png?fit=max&auto=format&n=vUvX6MCOtxusgHGw&q=85&s=1ba38b962944bc386ebd1f7fb2cf7ca6" alt="Create system user modal with name field and Admin role" width="727" height="378" data-path="images/meta-api/concepts/access-tokens/step-04-create-system-user-modal.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/chatsyncs/vUvX6MCOtxusgHGw/images/meta-api/concepts/access-tokens/step-05-system-user-created.png?fit=max&auto=format&n=vUvX6MCOtxusgHGw&q=85&s=ebf96c679b5a7c2d88e48a7f938a50cf" alt="System user created with no assets assigned" width="793" height="402" data-path="images/meta-api/concepts/access-tokens/step-05-system-user-created.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/chatsyncs/vUvX6MCOtxusgHGw/images/meta-api/concepts/access-tokens/step-06-assign-app-full-control.png?fit=max&auto=format&n=vUvX6MCOtxusgHGw&q=85&s=dddd55baab10b0c37e08a926a0bc2740" alt="Assign app full control to system user" width="782" height="390" data-path="images/meta-api/concepts/access-tokens/step-06-assign-app-full-control.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/chatsyncs/vUvX6MCOtxusgHGw/images/meta-api/concepts/access-tokens/step-07-assign-whatsapp-account-full-control.png?fit=max&auto=format&n=vUvX6MCOtxusgHGw&q=85&s=9897aa9c1dfa928046fa1c8b332c5c3c" alt="Assign WhatsApp Business Account full control to system user" width="784" height="457" data-path="images/meta-api/concepts/access-tokens/step-07-assign-whatsapp-account-full-control.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/chatsyncs/vUvX6MCOtxusgHGw/images/meta-api/concepts/access-tokens/step-08-generate-token-permissions.png?fit=max&auto=format&n=vUvX6MCOtxusgHGw&q=85&s=5b90105b5df9f6e9e2456be2752d209e" alt="Generate token — selecting WhatsApp business permissions" width="770" height="392" data-path="images/meta-api/concepts/access-tokens/step-08-generate-token-permissions.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/chatsyncs/vUvX6MCOtxusgHGw/images/meta-api/concepts/access-tokens/step-09-save-token.png?fit=max&auto=format&n=vUvX6MCOtxusgHGw&q=85&s=9bbb3e3ce797603134fd639daabd571d" alt="Token created — copy it now, it is shown only once" width="1023" height="682" data-path="images/meta-api/concepts/access-tokens/step-09-save-token.png" />
</Frame>

<Frame caption="The Meta Access Token Debugger for verifying a token's validity and expiry.">
  <img src="https://mintcdn.com/chatsyncs/vUvX6MCOtxusgHGw/images/meta-api/concepts/access-tokens/step-10-token-debugger.png?fit=max&auto=format&n=vUvX6MCOtxusgHGw&q=85&s=59dc12bfa79a09d01a07b630dbfe6cf5" alt="Token debugger" width="1673" height="421" data-path="images/meta-api/concepts/access-tokens/step-10-token-debugger.png" />
</Frame>

## Frequently asked

<AccordionGroup>
  <Accordion title="Why did my WhatsApp API stop working overnight?">
    Almost certainly your temporary access token expired (\~1 hour). Switch to a permanent
    system-user token for any production use.
  </Accordion>

  <Accordion title="How do I get a token that never expires?">
    Create a system user in Meta Business Manager, assign it full control over the app and the
    WhatsApp Business Account, generate a token for it with the WhatsApp permissions, and use
    that token in your API calls. It does not expire.
  </Accordion>

  <Accordion title="What is a system user?">
    A non-human admin account in Meta Business Manager used to generate permanent tokens for
    automated systems (bots, integrations). It is not tied to a personal Facebook account, so
    it won't expire when someone leaves the team.
  </Accordion>

  <Accordion title="How do I check if my token is valid?">
    Paste it into the Meta Access Token Debugger at
    `developers.facebook.com/tools/debug/accesstoken/` and click Debug. It shows the token's
    expiry, permissions, and whether it is still valid.
  </Accordion>
</AccordionGroup>

## Gotchas & common mistakes

<Warning>
  * **Temporary token expires in \~1 hour** — the single most common reason integrations
    break. Always use a system-user token in production.
  * **Token is shown only once** — when you generate a system-user token, copy it immediately.
    If you lose it, you must generate a new one.
  * **Permissions matter** — the system user token needs at minimum
    `whatsapp_business_messaging` to send messages. Missing permissions cause authentication
    errors even with a valid token.
  * **Token belongs to the system user, not a person** — if you use a personal user token
    instead, it may stop working if that person's account changes.
  * **Forgetting to assign assets** — a system user generates a token fine even with no assets
    assigned, but that token will fail to call the app or the WhatsApp account it was never given
    access to. Assign both the app and the WhatsApp Business Account with full control before
    generating the token.
</Warning>
