A Facebook Page access token lets an app act as a Facebook Page through the Graph API. Depending on the permissions the page admin granted, whoever holds it can publish and delete posts, read and answer messages sent to the page, read comments and insights, manage the page’s ads or lead forms, and change some of its settings. It stands in for the page itself: no password and no second factor are involved. A hijacked page can be used for scams, spam to your followers, or to read private customer conversations. Cut the token’s access first, then review what happened on the page.
Check your GitHub account for leaked secrets — free
- Provider
- Severity
- Critical
- Impact
- SaaS account access and billing
- Checked live by LeakWatch
- No
What a Facebook Page access token looks like
Page access tokens are long opaque strings that begin with EAA. The families used for apps and pages commonly start with EAAM or EAAC (the fourth character varies), followed by letters and digits only. Real tokens are several hundred characters long, far longer than most API keys:
EAAM…XXXX Facebook Page access token (masked, typically 200+ characters)
Variable names to search for: FB_PAGE_TOKEN, FACEBOOK_PAGE_ACCESS_TOKEN, PAGE_ACCESS_TOKEN, or an access_token= query parameter in a call to graph.facebook.com, often to /me/messages or /{page-id}/feed. Do not confuse it with related values. A user access token has the same EAA prefix and is a different thing, since a page token is derived from it. An app access token has the form app-id|app-secret. The app secret is a 32-character hex string. Chatbots built on Messenger rely on the page token in particular, so a bot repository is the typical place to find one.
How Facebook Page access tokens get leaked
- Messenger and WhatsApp-style bots. Webhook servers for Messenger bots keep the page token in a config file or a hardcoded constant.
- Environment files.
PAGE_ACCESS_TOKENin a.envfile or a deployment manifest committed to a public repository. - Tutorials and sample code. Copied from the Graph API Explorer and pasted into a script that is then published.
- Scheduling and auto-posting scripts. Small tools that publish to a page on a schedule, with the long-lived token stored in the source.
- URLs in logs and issues. The token is passed as a query parameter, so it appears in server logs, proxy logs, and bug reports that paste the failing request.
What to do in the first hour
- Identify the page and the app. The token belongs to one page and was issued to one Meta app. In the Meta developer dashboard, find the app. You can paste the token into Meta’s access token debugger to see the app, the page, the expiry and the granted permissions, though doing so sends the value to Meta, which is acceptable since you are about to invalidate it.
- Cut off the access. Page tokens are tied to a user’s authorization of the app. Remove the app from the connected business integrations of the admin who generated the token, and reset the app secret in the app’s basic settings if you control the app. Changing the admin’s password also ends their sessions. Check Meta’s documentation for which actions invalidate which token types.
- Generate a new token through your normal flow, store it in a secret manager, deploy it, and send a test message or post.
- Audit the page. Open the page’s activity log and the list of recent posts, scheduled posts and comments. Look for content you did not write, removed posts, or changed settings. Review the inbox for messages sent in your name.
- Check page roles and webhooks. Verify who is an administrator or editor of the page, which apps are connected, and which webhook subscriptions exist. Remove what you do not recognize.
- Warn people if needed. If scam posts or messages went out, tell followers and customers.
- Clean up the code and search for related credentials. See I accidentally pushed an API key to GitHub.
Not sure what else leaked from the same repository? Run a free scan.
Revoke it at Meta
A page token has no delete button of its own. It is revoked by ending the authorization it comes from, through the Meta for Developers dashboard for the app (resetting the app secret in the basic settings) and through the admin’s connected apps in their Facebook account settings (removing the app). A person has not confirmed the exact menu wording for this guide, and Meta renames these pages regularly, so look for the section where an account’s connected business integrations are listed, and follow the access token documentation in the Meta for Developers docs.
How LeakWatch detects it
The rule is called Facebook Page Access Token. It matches the literal, case-sensitive prefix EAA, then a fourth character that must be M or C, then at least 100 letters or digits, with a word boundary on both sides. It does not need a variable name next to it. The long minimum length is deliberate: it filters out short identifiers that happen to start with the same letters. A lowercase eaam prefix, a fourth letter other than M or C, or a token shorter than about 104 characters in total is not reported. The severity is critical. This type is not checked live: LeakWatch does not call the Graph API with the token, so a hit shows the right shape, not that the token still works. Note that tokens starting with other EAA families are not covered by this rule.
LeakWatch detects this format but does not check it live: it can tell you the key is exposed, not whether it still works. Assume it does until you have revoked it.
FAQ
Does a page token expire?
Short-lived user tokens do, but page tokens derived from a long-lived user token have no expiry date. Do not rely on expiry. Revoke the authorization it came from.
Can the token read private messages?
If the app was granted messaging permissions for the page, yes. Check the permissions in the debugger and review the page inbox.
Is it enough to delete the file from the repository?
No. The value stays in the git history and in forks. Revoke it first, then clean the history.