Appearance
Fresh 2026
Quick Reference
API base
| Item | Value |
|---|---|
| Graph API host | https://graph.facebook.com |
| Versioned path | https://graph.facebook.com/{version}/{path} |
| Current version line | v25.0 era (always confirm in the changelog) |
| Auth | access_token query param or Authorization: Bearer {token} |
| Marketing API account prefix | act_{ad_account_id} |
Token types
| Token | Lifetime | Use |
|---|---|---|
| User Access Token (short) | ~1 hour | Initial login exchange |
| User Access Token (long) | ~60 days | Server-side user calls |
| Page Access Token | Matches user token / never (if from long-lived) | Act as a Page |
| App Access Token | Until secret rotates | App-level, server-only |
| Client Token | Static | Mobile/JS SDK init only |
Common error codes
| Code | Meaning | Recovery |
|---|---|---|
190 | Invalid / expired access token | Re-authenticate the user |
102 | Session/API session error | Re-authenticate |
4 | Application request limit reached | Back off, retry later |
17 | User request limit reached | Back off per-user |
32 | Page request limit reached | Back off per-page |
613 | Custom rate limit (Marketing API) | Exponential backoff |
200 / 10 / 803 | Permission / unsupported request | Re-request the missing scope |
1 / 2 | Unknown / temporary error | Retry with backoff |
Every error returns code, optional error_subcode, message, and fbtrace_id. Always log fbtrace_id.
Useful endpoints
| Action | Endpoint |
|---|---|
| Current user | GET /me?fields=id,name |
| Debug a token | GET /debug_token?input_token={t}&access_token={app_token} |
| Exchange long-lived | GET /oauth/access_token?grant_type=fb_exchange_token&... |
| Batch request | POST / with batch=[...] (up to 50 calls) |
| Page feed | GET /{page-id}/feed |
| Publish IG media | POST /{ig-user-id}/media then /media_publish |
| Ad account campaigns | GET /act_{id}/campaigns |
Rate limiting notes
- Graph API uses per-app, per-user, and per-page limits; Marketing API and Business Use Case (BUC) limits are separate.
- Watch the
X-App-Usage,X-Page-Usage, andX-Business-Use-Case-Usageresponse headers, back off as they approach 100%. - Prefer batch requests and field expansion to reduce call volume.
Request patterns
bash
# Basic read with field expansion
curl -s "https://graph.facebook.com/v25.0/me?fields=id,name,email&access_token=$TOKEN"
# Debug a token
curl -s "https://graph.facebook.com/v25.0/debug_token?input_token=$USER_TOKEN&access_token=$APP_TOKEN"
# Batch request (up to 50 sub-requests)
curl -s -X POST "https://graph.facebook.com/v25.0" \
-F "access_token=$TOKEN" \
-F 'batch=[{"method":"GET","relative_url":"me"},{"method":"GET","relative_url":"me/accounts"}]'See Graph API → Handle Errors and Versioning for the authoritative detail.