Everything an AI agent can do with the Meta Graph API.

A reference guide for building AI agents: every method, how to authenticate, and the permissions each one needs.

Endpoints23
API versionv25.0
Last updated23 June 2026
Orientation

How the Meta Graph API works.

The Meta Graph API is how an app or AI agent works with Facebook and Instagram: publishing a Page's posts, reading its insights, moderating comments, publishing to a linked Instagram account, and sending Messenger messages. Access is granted through an OAuth 2.0 access token and a set of Meta permissions, where the token type sets which Pages and accounts a call can reach, and most permissions go through App Review first. Meta versions the API by dated release and can push events to a webhook once a Page is subscribed to the app.

23Endpoints
7Capability groups
12Read
11Write
11Permissions
Authentication
The Meta Graph API authenticates with OAuth 2.0 access tokens. A User token represents a logged-in person, a Page token acts as a Page and is needed for most Page and Instagram work, and an app token identifies the app for tasks like webhook setup. Page tokens are obtained from a User token through /me/accounts, and a long-lived User token lasts about 60 days. An Instagram professional account is always reached through the Facebook Page it is linked to.
Permissions
Access is governed by granular Meta permissions on the token, like pages_read_engagement to read a Page, pages_manage_posts to publish, pages_manage_engagement for comments and likes, pages_messaging for Messenger, read_insights for Page metrics, and instagram_basic, instagram_content_publish, and instagram_manage_insights for Instagram. Most permissions beyond public_profile require App Review, where each is justified to Meta before it works for live users, and a Page token also depends on the person's tasks on the Page, like CREATE_CONTENT or MODERATE.
Versioning
The Graph API is versioned by dated release, named like v25.0, and each call is pinned to a version in its request path. The newest version is v25.0, released on 18 February 2026, and each version is supported for about two years before it expires and stops responding. Breaking changes ship in a new version, so an integration can pin one and migrate on its own schedule.
Data model
The Graph API models Facebook and Instagram as a graph of nodes, like a Page, a post, a comment, or an Instagram account, connected by edges, like a Page's feed or an account's media. A call reads or writes a node or an edge under the host graph.facebook.com. State changes are pushed to webhooks once a Page is subscribed to the app, and lists are cursor-paginated.
Connect & authenticate

Connection & authentication methods.

How an app or AI agent connects to the Meta Graph API determines what it can reach. Access runs on OAuth 2.0 access tokens, and the kind of token, a User token, a Page token, or an app token, decides which Pages and Instagram accounts a call can act on.

Ways to connect

Graph API

The Graph API answers at graph.facebook.com, with each request pinned to a dated version in its path, like v25.0. A call authenticates with an OAuth 2.0 access token, where a User token, a Page token, or an app token decides what it can reach.

Best forConnecting an app or AI agent to Facebook Pages and Instagram.
Governed byThe access token and the Meta permissions it carries.
Docs ↗

Webhooks

Meta posts event payloads to a webhook URL registered for the app once a Page is subscribed through its subscribed_apps. Each delivery carries an X-Hub-Signature-256 header that the receiver checks against the app secret to confirm it came from Meta.

Best forReceiving Page and Instagram events at an app or AI agent.
Governed byThe app secret on the webhook and the Page subscription.
Docs ↗
Authentication

User access token

A User access token represents a person who logged in with Facebook Login and consented to a set of permissions. It is the starting point for reaching the Pages and Instagram accounts that person manages, and is usually exchanged for a long-lived token that lasts about 60 days.

TokenOAuth 2.0 User access token
Best forLogging a person in and discovering the Pages they manage.
Docs ↗

Page access token

A Page access token acts as a Page rather than a person, and most Page and Instagram methods need one. It is obtained from a User token through /me/accounts, and the tasks the person has on the Page, like CREATE_CONTENT, MODERATE, or MANAGE, decide what the token can do.

TokenOAuth 2.0 Page access token
Best forReading and managing a specific Page and its linked Instagram account.
Docs ↗

App access token

An app access token identifies the app itself rather than any user, formed from the app id and app secret. It is used for app-level tasks, like managing webhook subscriptions and reading public data, and must never be exposed in client code.

TokenOAuth 2.0 App access token
Best forServer-side app-level tasks and webhook setup.
Docs ↗
Capability map

What an AI agent can do in Meta Graph.

The Meta Graph API is split into areas an agent can act on, like a Facebook Page's posts and insights, comments and likes, an Instagram account's media, and Messenger conversations. Each area has its own methods and its own permissions, and most of those permissions go through App Review before they reach live users.

Endpoint reference

Every Meta Graph API method.

Filter by method, access, or permission, or search any path. Select a row for version detail, rate limits, the related webhook event, and the source.

MethodEndpointWhat it doesAccessPermissionVersion

Pages (posts & photos)

Read a Page's details, read and publish posts on its feed, publish photos, and update or delete a post.6

Needs a Page access token. pages_show_list also lets an app find which Pages the person manages.

Acts onpage
Permission (capability)pages_read_engagement
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Reading another Page's public posts without managing it uses the Page Public Content Access feature, which goes through App Review.

Acts onpost
Permission (capability)pages_read_engagement
VersionAvailable since the API’s base version
Webhook eventfeed
Rate limitStandard limits apply

Needs a Page access token from a person with the CREATE_CONTENT task. pages_manage_posts depends on pages_read_engagement and pages_show_list, and all go through App Review.

Acts onpost
Permission (capability)pages_manage_posts
VersionAvailable since the API’s base version
Webhook eventfeed
Rate limitStandard limits apply

An image can be passed as a URL or uploaded directly. Needs a Page access token with the CREATE_CONTENT task.

Acts onphoto
Permission (capability)pages_manage_posts
VersionAvailable since the API’s base version
Webhook eventfeed
Rate limitStandard limits apply

Needs a Page access token with the CREATE_CONTENT task.

Acts onpost
Permission (capability)pages_manage_posts
VersionAvailable since the API’s base version
Webhook eventfeed
Rate limitStandard limits apply

Deletion is permanent. Needs a Page access token with the CREATE_CONTENT task.

Acts onpost
Permission (capability)pages_manage_posts
VersionAvailable since the API’s base version
Webhook eventfeed
Rate limitStandard limits apply

Page insights

Read a Facebook Page's metrics, like impressions, engagement, and follower counts, over a chosen period.1

Needs read_insights plus a Page access token. Several reach and impression metrics are being removed from June 2026 in favour of media-view metrics.

Acts oninsights
Permission (capability)read_insights
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Comments & likes

Read comments on a Page's posts, create and delete comments, and like a post on behalf of the Page.4

On Page posts, photos, and videos this returns empty data with a User token, so a Page access token is required. Reading comments left by other people also needs pages_read_user_content.

Acts oncomment
Permission (capability)pages_read_engagement
VersionAvailable since the API’s base version
Webhook eventfeed
Rate limitStandard limits apply

Needs a Page access token with the MODERATE task. The comment carries at least a message, attachment, or source.

Acts oncomment
Permission (capability)pages_manage_engagement
VersionAvailable since the API’s base version
Webhook eventfeed
Rate limitStandard limits apply

Deleting a comment left by another person also needs pages_read_user_content. Needs a Page access token with the MODERATE task.

Acts oncomment
Permission (capability)pages_manage_engagement
VersionAvailable since the API’s base version
Webhook eventfeed
Rate limitStandard limits apply

Needs a Page access token with the MODERATE task.

Acts onlike
Permission (capability)pages_manage_engagement
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Instagram

Read an Instagram professional account's profile and media, publish a photo or video, and read its insights.5

The Instagram account is reached through the Facebook Page it is linked to, so the call also needs pages_read_engagement and a Page access token.

Acts onig-user
Permission (capability)instagram_basic
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Also needs pages_read_engagement and a Page access token for the linked Page.

Acts onig-media
Permission (capability)instagram_basic
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

The image or video must be hosted on a publicly reachable URL. Also needs instagram_basic, pages_read_engagement, and a Page access token. instagram_content_publish goes through App Review.

Acts onig-media
Permission (capability)instagram_content_publish
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

An account is limited to 100 API-published posts in a rolling 24-hour window, counted on this endpoint, where a carousel counts as one.

Acts onig-media
Permission (capability)instagram_content_publish
VersionAvailable since the API’s base version
Webhook eventNone
Rate limit100 posts per 24h

Also needs a Page access token for the linked Page. instagram_manage_insights goes through App Review.

Acts oninsights
Permission (capability)instagram_manage_insights
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Conversations & Messenger

List a Page's Messenger conversations, read the messages in one, and send a message from the Page.3

The platform parameter selects messenger or instagram. Also needs pages_manage_metadata and pages_read_engagement, plus a Page access token.

Acts onconversation
Permission (capability)pages_messaging
VersionAvailable since the API’s base version
Webhook eventmessages
Rate limitStandard limits apply

Also needs pages_read_engagement and a Page access token.

Acts onmessage
Permission (capability)pages_messaging
VersionAvailable since the API’s base version
Webhook eventmessages
Rate limitStandard limits apply

Sending outside the 24-hour standard messaging window needs an approved message tag. pages_messaging goes through App Review and needs a Page access token.

Acts onmessage
Permission (capability)pages_messaging
VersionAvailable since the API’s base version
Webhook eventNone
Rate limit200 * engaged users per 24h

User profile

Read the authenticated person's basic public profile and the list of Pages they manage.2

public_profile is granted automatically with Facebook Login. The email field needs the separate email permission, which goes through App Review.

Acts onuser
Permission (capability)public_profile
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

This is the usual way to obtain the Page access tokens the other Page methods need.

Acts onpage
Permission (capability)pages_show_list
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Webhooks

Subscribe a Page to the app's webhook so Meta pushes its events, and list the apps a Page is subscribed to.2

The subscribed_fields parameter names which Page events to receive, like feed, messages, or mention. It cannot configure Instagram webhooks. Needs a Page access token with the relevant task.

Acts onsubscribed_app
Permission (capability)pages_manage_metadata
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Also needs pages_show_list and a Page access token.

Acts onsubscribed_app
Permission (capability)pages_manage_metadata
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply
No endpoints match those filters.
Webhooks

Webhook events.

Meta can notify an app or AI agent when something happens on a Page or Instagram account, like a new post, a comment, or an incoming message, instead of the app polling for changes. A Page is subscribed to the app, and Meta then posts each event to the webhook URL registered for the app.

EventWhat it signalsTriggered by
feedFires when a Page's feed changes, like a new post, a status update, or a new comment or like on the Page's content./{page-id}/feed
/{page-id}/photos
/{object-id}/comments
messagesFires when the Page receives a message in Messenger, the core event for a messaging or support agent.In-app only
mentionFires when the Page is mentioned in another person's or Page's post or comment.In-app only
No events match that search.
Rate limits & pagination

Rate limits, pagination & request size.

Meta limits how fast and how much an app or AI agent can call, through a platform quota that scales with daily active users and a separate business-use-case quota that scales per Page, both reported in usage headers on every response.

Request rate

Meta meters calls two ways at once. The platform limit applies to calls on a User or app token and allows roughly 200 calls per hour for each daily active user the app has, summed into one app-wide pool, reported in the X-App-Usage header as call_count, total_cputime, and total_time percentages. The business-use-case limit applies to Pages, Instagram, and Marketing calls, and scales per Page, with the Pages quota at about 4,800 calls per engaged user over 24 hours and Messenger at about 200 per engaged user; it is reported in X-Business-Use-Case-Usage, which also returns estimated_time_to_regain_access in minutes once throttled. Going over returns an error with code 4 for the app limit, 17 for a user, or 32 for a Page. Instagram publishing has its own ceiling of 100 posts per account in a rolling 24-hour window.

Pagination

List results are cursor-paginated. A response carries a paging object with before and after cursors and next and previous URLs, and the limit parameter sets the page size. Some edges also support time-based paging through the since and until parameters, and offset paging through offset, though cursor paging is preferred for large or changing sets.

Request size

Direct photo and video uploads are bounded by per-media size and length limits that vary by media type, and large videos use a resumable upload session rather than a single request. Instagram media must be hosted on a publicly reachable URL at the moment of publishing. An fbtrace_id returned on an error is a short-lived support identifier, not a stable record.

Errors

Status codes & error handling.

The status codes an agent should handle, and what to do about each.

StatusCodeMeaningWhat to do
400100 (invalid parameter)A parameter is missing, malformed, or not valid for the request. The error object carries a message, type, code, error_subcode, and an fbtrace_id for support.Read the message and error_subcode, correct the named parameter, and resend.
400190 (access token expired or invalid)The access token is missing, expired, revoked, or otherwise invalid. error_subcode often gives the precise reason, like the user changed their password or revoked consent.Obtain a fresh token, re-running Facebook Login if the person needs to re-consent.
403200 (permission denied)The token does not carry the permission the request needs, or the person lacks the required task on the Page.Request the missing permission, get it approved in App Review, and confirm the person's Page task.
4034 (application rate limit)The app exceeded its platform rate limit, which scales with the app's daily active users.Slow the request rate and retry later. The X-App-Usage header reports how close to the limit the app is.
40332 (page rate limit)A Page-level business-use-case rate limit was hit, which scales with the Page's engaged users.Back off using estimated_time_to_regain_access from the X-Business-Use-Case-Usage header, then retry.
5002 (service temporarily unavailable)A temporary problem on Meta's side, which is usually transient.Retry the request with exponential backoff.
Versioning & freshness

Version history.

Meta versions the Graph API by dated release, named like v25.0, and pins each call to the version in its path. The newest version is v25.0, released on 18 February 2026, and each version is supported for about two years before it expires.

Version history

What changed, and when

Latest versionv25.0
v25.0Current version
Current version

Graph API v25.0 was released on 18 February 2026. It begins the deprecation of several reach and impression metrics across the Page, Post, Video, and Stories Insights APIs, which are replaced by media-view and media-viewer metrics from June 2026, and deprecates the metadata=1 query parameter. A separate infrastructure change moves Webhooks mTLS certificates to a Meta-owned Certificate Authority from 31 March 2026.

What changed
  • Reach and impression metrics across Page, Post, Video, and Stories Insights deprecated, replaced by media-view and media-viewer metrics from June 2026
  • The metadata=1 query parameter deprecated, to be removed from 26 May 2026
  • Webhooks mTLS certificates move to a Meta-owned Certificate Authority from 31 March 2026
  • Ads Insights async error reporting expanded with detailed error fields
v24.0
October 2025 release

Graph API v24.0 was released on 8 October 2025, continuing the roughly quarterly version cadence ahead of v25.0.

What changed
  • Routine quarterly version with field and metric updates across the Pages, Instagram, and Marketing surfaces
v23.0
May 2025 release

Graph API v23.0 was released on 29 May 2025.

What changed
  • Routine quarterly version with field and metric updates across the Pages, Instagram, and Marketing surfaces
v22.0
January 2025 release

Graph API v22.0 was released on 21 January 2025.

What changed
  • Routine quarterly version with field and metric updates across the Pages, Instagram, and Marketing surfaces

An integration can pin a version in the request path and move up on a schedule that suits it.

Meta Graph API changelog ↗
Questions

Meta Graph API, answered.

How do I get a Page access token?+
First a person logs in with Facebook Login and grants the Page permissions, which yields a User access token. Calling GET /me/accounts with that token returns the Pages the person manages, each with its own Page access token. Most Page and Instagram methods need that Page token rather than the User token. Exchanging the User token for a long-lived one first gives Page tokens that do not expire.
Why does almost every permission need App Review?+
Beyond public_profile, Meta requires each permission to be approved in App Review before it works for people who are not admins, developers, or testers of the app. The submission explains why the app needs the permission and usually includes a screencast. Until a permission is approved, it works only for the app's own team, so an integration is built and tested in development mode, then submitted for review before going live.
How are the rate limits structured?+
There are two systems. The platform limit covers User and app token calls and scales with the app's daily active users, reported in the X-App-Usage header. The business-use-case limit covers Pages, Instagram, and Marketing calls and scales per Page, reported in X-Business-Use-Case-Usage, which also returns estimated_time_to_regain_access once throttled. Hitting a limit returns error code 4 for the app, 17 for a user, or 32 for a Page, and Instagram publishing is separately capped at 100 posts per account per 24 hours.
How do I post to Instagram through the API?+
Publishing is two steps. A POST to /{ig-user-id}/media creates a media container from a publicly hosted image or video URL and returns a container id, then a POST to /{ig-user-id}/media_publish publishes that container. It needs instagram_content_publish plus instagram_basic, and the account is reached through its linked Facebook Page, so a Page access token and pages_read_engagement are also required. An account can publish at most 100 posts in a rolling 24-hour window.
How do I receive events instead of polling?+
Webhooks deliver events without polling. The app registers a webhook URL and verify token, then a POST to /{page-id}/subscribed_apps subscribes a Page and names the fields to receive, like feed, messages, or mention. Meta then posts a JSON payload when each event fires, and the X-Hub-Signature-256 header, checked against the app secret, confirms the payload came from Meta. Instagram webhooks are configured separately from the Page subscribed_fields.
How does Graph API versioning work?+
Each request names a dated version in its path, like v25.0, and stays on that version until the call is changed. Meta releases a new version every few months and supports each for about two years before it expires and stops responding. Breaking changes land only in a new version, so an integration can pin one version, test the next, and migrate before the pinned one expires.
Related

More social API guides for agents

What is Bollard AI?

Control what every AI agent can do in Meta Graph.

Bollard AI sits between a team's AI agents and the Meta Graph API. Grant each agent exactly the access it needs, read or write, Page by Page, and every call is checked and logged.

  • Set read, write, or full access per agent, never a shared Page token.
  • Denied by default, so an agent reaches only what has been explicitly allowed.
  • Every call recorded in plain English: who, what, where, and the decision.
Meta Graph
Social Agent
Read Page posts and insights ResourceOffReadFull use
Publish a Page post ActionOffReadFull use
Reply to comments ActionOffReadFull use
Send Messenger messages ActionOffReadFull use
Per-agent access, set in Bollard AI, not in Meta