Wondering can anyone point me in the right direction here. I am trying to access the activity endpoint of the facebook marketing api and keep getting a missing permissions error.

https://developers.facebook.com/docs/marketing-api/reference/ad-activity/

Can anyone help or point me to what I am doing wrong?

I am following this stack so think I am right in graph endpoint:

Using the Activity Log Endpoint in the Facebook Marketing APIs

Endpoint I am creating looks like this in python:

url = f"https://graph.facebook.com/v20.0/act_{account_id}/activities?access_token={access_token}" 

I have tried recreating my token and giving all permissions to it and still getting the same error so not sure what I am missing. Can someone point me to the permissions required for it? This is the error I'm seeing:

Here is the error:

{'error': {'message': '(#100) Missing permissions', 'type': 'OAuthException', 'code': 100, 'fbtrace_id': 'Aa6zg3SUnxRo_rLBI6EQTtA'}} 

Tag:python, facebook-graph-api

4 comments.

  1. Lokesh M

    Standard Access ads_read and ads_management permissions are sufficient for managing your ad account. To manage other ad accounts, you’ll need Advanced Access permissions.

    Ref: https://blog.coupler.io/facebook-ads-api/

    1. Seamus O'Connor

      Hi Lokesh, Thanks for that. Do you happen to know what advanced access is needed? I can't find anywhere what specific access is required. Is it advanced access to the marketing api or specific permissions from the user granted?

    2. Lokesh M

      I got the access tokens with below permissions ads_management, business_management, pages_read_engagement, pages_manage_metadata, pages_read_user_content, pages_manage_ads. After that I have tried the url https://graph.facebook.com/v20.0/act_{account_id}/activities?access_token={access_token} it worked for me.

    3. Lokesh M

      Also, complete Business Verification for your account. I am not sure business verification is really need but my account has already bussiness verified so I think that might be required.

Add a new comment.