gouy_e
gouy_e

Reputation: 188

What permissions are needed to call /{page-id}/ads_posts on Facebook Graph API?

I'm trying to list the Ads for a Facebook Page using the Graph API /{page-id}/ads_posts endpoint, but I get a permissions when I try to.

Using the Graph API Explorer, I generate an Page Access Token with those permissions: email, read_insights, manages_pages, pages_show_list, ads_read, business_management, instagram_basic, instagram_manage_insights and public_profile. I'm an admin on the Page itself, the attached Business Manager and on the corresponding Ad Account.

Every time I try to call the /{page-id}/ads_posts, I receive

{
  "error": {
    "message": "(#200) Not enough permission to call this endpoint",
    "type": "OAuthException",
    "code": 200,
    "fbtrace_id": "XXXXX"
  }
}

I can't find any help on the Facebook documentation or Google, given that the error isn't really meaningful (in some cases, I get a message saying that a specific permissions is missing, but not here). Anyone can help ?

EDIT: I tried to add the ads_management permission too, without success.

Upvotes: 3

Views: 1287

Answers (2)

Manal Liaquat
Manal Liaquat

Reputation: 318

It is mentioned in API documentation:

Requirements: You will need:

  1. The pages_manage_ads permission
  2. The pages_show_list permission
  3. The ads_management permission
  4. The person requesting the access token must be able to perform the ADVERTISE task on the Page.
  5. Page access token

Upvotes: 0

artisare
artisare

Reputation: 501

You need to add those pages to your app that is in development mode (https://www.facebook.com/settings?tab=business_tools).

Upvotes: 0

Related Questions