Meta long-lived token setup and rotation

Meta Long-Lived Access Token: Setup and Rotation

4 min read • install

Admaxxer is a DTC analytics platform with built-in Meta + Google ad ops. Long-lived Meta user access tokens are valid for roughly 60 days, which means every connection you add has a rolling expiry clock that needs proactive rotation. TL;DR: use the Admaxxer OAuth flow (or paste-token flow) to mint a fresh long-lived token, keep the daily meta-token-expiry cron enabled, and reauth anytime a connection reports an expiry inside the 7-day warning window.

Symptoms

Root cause

Meta exposes two token lifetimes:

Admaxxer always exchanges to a long-lived token before storing it. Even so, 60 days is a hard ceiling. If the token is not rotated or reauthorized before it hits that ceiling, Meta invalidates it and every subsequent call to Meta Marketing API v21.0 returns an OAuth error. Secondary causes: the user changed their Facebook password, revoked the app, or hit a Meta-wide throttle such that repeated requests look like abuse and Meta invalidates the token defensively.

Fix

Step 1: Open the Meta connection card

Admaxxer -> Connections -> Meta. The card shows the current expiry timestamp and a badge when it is inside the warning window.

Step 2: Choose OAuth or paste-token

Step 3: Confirm token scopes

Admaxxer requires at least ads_read and ads_management, plus business_management if you want Admaxxer to discover ad accounts inside a Business Manager. Missing scopes cause silent 403s on specific endpoints.

Step 4: Let Admaxxer encrypt and store the token

The new token is encrypted with AES-256-GCM and written to ad_platform_connections. The card should flip back to green and a backfill sync queues automatically.

Step 5: Respect the rate limits

Meta Marketing API user tokens are budgeted at roughly 200 calls per hour per user token. Reconnecting triggers a burst backfill, so watch the Admaxxer sync log — if you see 80%+ utilization, Admaxxer auto-throttles, but it is worth noting.

Verify the fix

Prevent it next time

Related guides

FAQs

Q: Why 60 days and not forever? A: Meta intentionally caps long-lived user tokens at about 60 days to limit blast radius if a token leaks. Page and system-user tokens can last longer, but those require Meta Business Manager and App Review.

Q: Can Admaxxer auto-rotate the token without a user click? A: Admaxxer re-exchanges the token against fb_exchange_token when possible, but Meta does not allow indefinite silent rotation. Once the 60-day ceiling is hit, a user has to reauth.

Q: What happens to my data if I miss the rotation window? A: Syncs pause until you reconnect, but Admaxxer backfills the gap automatically once a new token is in place.

Frequently Asked Questions

Why 60 days and not forever?

Meta caps long-lived user tokens at roughly 60 days to limit blast radius if a token leaks. Page and system-user tokens can last longer but require Meta Business Manager and App Review.

Can Admaxxer auto-rotate the token without a user click?

Admaxxer re-exchanges the token against fb_exchange_token when possible, but Meta does not allow indefinite silent rotation. At the 60-day ceiling a user has to reauth.

What happens to my data if I miss the rotation window?

Syncs pause until you reconnect, but Admaxxer backfills the gap automatically once a new token is in place.

Put This Knowledge Into Action

Bring Meta and Google ads into one self-hosted workspace.

Get Started Free