I've been working on an application in ES6 / Node that fetches and returns API data from Facebook Graph. I am using OAuth2 to authenticate as myself, and then using the access tokens returned from this login to make my API calls.
All my organic API calls work fine; but I am getting stuck on the API calls for Ads (using the Marketing API). I've tried in Graph Explorer and I get the same error:
{
"error": {
"message": "Unsupported get request. Object with ID '194710072396215' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "AjSeizCK0wiEy8u6C9sFq0L"
}
}
I started with a deep dive into Facebook's documents to see where I was getting stuck. The first thing is that code 100 and subcode 33 indicates that:
This error may occur if your access token is not added as a system user with appropriate permissions to the ad account that owns a Custom Audience. Verify the ad account in Business Manager and verify all system users appear under the ad account as Admin:
This isn't my problem, as I am the admin of the ad account (I created it myself!). It belongs to a Business Manager entity that I am also the admin on.
Secondly, I've triple checked and the Ad Account ID is added under Advanced Settings, in my Facebook Developer App.
The last thing I'm not sure about is App verification and whether that's potentially my blocker... according to Facebook documentation though, Standard Access, and I can see mine is ready to use:
Business apps are automatically approved for Standard Access for all Permissions and Features available to the Business App Type. Use this option if you're getting started. You can build end-to-end workflows before requesting full permissions. You can access an unlimited number of ad accounts.Some API calls may not be available with Standard Access because they may belong to multiple accounts, or the affected account can't be identified programmatically.
What am I missing here? I can't find any further solutions and Facebook doesn't get back to me.
The Insights API uses act_ as prefix act_<AD_ACCOUNT_ID>/insights
. Example:
act_10151816772662695/insights?action_attribution_windows=['1d_click','1d_view']