Meta system user and an ads_read token: a 10-minute setup
A system user token isn't tied to a personal profile and can be non-expiring, which makes it right for servers, bots and AI agents. The steps: create a Business-type app on developers.facebook.com; in business portfolio settings open Users → System users and add a user with the Employee role; assign the app and the needed ad accounts with view access; then click 'Generate token', choose the app, set expiry to 'Never' and select only the ads_read permission. The token is shown once, so save it straight away to a secrets manager or a server .env file.
I use this token in my ad account monitoring bot and in every script that reads Meta. You do it once.
What you need
- admin rights in the business portfolio;
- a developer account on developers.facebook.com;
- ad accounts owned by or shared with the portfolio.
Step 1. App
developers.facebook.com → My Apps → Create App → type ‘Business’ → link it to your business portfolio. Add the Marketing API product. You don’t need to publish the app to read your own accounts.
Step 2. System user
business.facebook.com/settings → Users → System users → Add. Name it by purpose, e.g. ‘reporting-bot’, role Employee.
Step 3. Access
On the system user card, ‘Assign assets’:
- The app from step 1 (without it the generate token button won’t appear).
- Ad accounts with view performance access. Full control isn’t needed if the script only reads.
Step 4. Token
‘Generate token’ → choose the app → expiry Never → permissions: ads_read. Click Generate and copy the token immediately: it won’t be shown again.
Step 5. Storage and check
Put the token in a server .env or a secrets manager, not in chat, code or a spreadsheet. Check:
curl -G https://graph.facebook.com/v24.0/me/adaccounts \
-d fields=name,account_status \
-d access_token=$META_TOKEN
The response should list every account you assigned. The Access Token Debugger shows the expiry: it should say ‘Never’.
Common mistakes
| Symptom | Cause |
|---|---|
| No ‘Generate token’ button | No app assigned to the system user |
| Empty account list | Accounts not assigned to the system user |
| Error 200 | ads_read not selected when generating the token |
| Error 190 | Token revoked or user deleted |
Other codes are covered in the Marketing API errors article.
Questions and answers
Why is a system user token better than a personal one?
A long-lived personal token expires after about 60 days and breaks when the password changes or the person leaves. A system user token can be non-expiring and belongs to the business.
Which permissions should I grant?
Only what the task needs. For reports, monitoring and an AI agent that only reads, ads_read is enough. ads_management only if the script changes campaigns. business_management almost never.
Admin or employee?
Employee. The admin system user role is for managing the business portfolio itself; for reading ads it's an unnecessary risk.
How do I add a new ad account to an existing token?
Grant the system user access to the new account in business portfolio settings. No need to reissue the token.
What if the token leaks?
Revoke it on the system user card and generate a new one. Update it everywhere it's stored.