Facebook Graph API error #272 - facebook

I'm building an application that needs to read Facebook ads information and I'm running into an issue, which to me seems strange.
When I access the campaigns for my adaccounts using https://graph.facebook.com/v2.10/me?fields=adaccounts{campaigns} it works and I can see the campaigns and their properties.
When I change the request to access the campaign to https://graph.facebook.com/v2.10/[campaign_id] it results in an error which says:
(#272) This Ads API call requires the user to be admin of the application. User is not admin or developer of this application.
I can see the properties of the campaigns using "me" as the first Node in the request.
Any idea why can't I access the campaign using a request where the campaign is the first Node? What could be the reason behind this problem?

I've read many posts on this and I found that this is most likely a permissions issue or token issue.
First of all, could you please try to login as the user, and then go to Facebook Ads Manager or Power Editor to check if the user still has permissions on the account?
If you can still see and edit the ad account, then you would need to report this issue at https://developers.facebook.com/bugs/ instead.
This could also be one of the explanation.
This may be due to your ad account is inactive or in a bad standing. Additionally if your access level of your ad account is in development level these types of errors may occur. please go through what's mentioned on the doc here If you upgrade your account to basic or standard access levels this will be solved.
On development access level only end to end workflows are suggested. The following text is extracted from facebook documentation.
The development access level is designed for development purposes and
is ideal for people who are just starting to build out their tool. In
this level, you would not yet have customers using your tool. This
level is open to all developers, and is intended to build out
end-to-end workflows on the API before you get full permissions.

Related

How to add course completions to user profiles using API for users that have allowed sharing

Working on adding course completion information to users that have authorized our system to write to their profile. Looking at the LinkedIn API, https://learn.microsoft.com/en-us/linkedin/compliance/ it looks this is possible if granted the w_compliance authorization but it doesn't seem to be available in the application setup.
I have been trying to contact developer support email provided but have had no response in the last week. Is there a path or setting that I am not seeing?
How does one get an authentication grant that includes the ability to update user profile course information?

Marketing API - System user permissions missing, using dev tier

We implemented the Marketing API into our company's order management system to automate the creation of ad campaigns. A system user was created with the proper permissions, and the integration has been working. We're only using the API for our own ad account and pages, which we of course own. The "Facebook App" is set to live mode and has been for a couple weeks now.
But starting sometime today, we have been getting errors saying that the ads_read and ads_management permissions are required. And sure enough, they are indeed missing from the access token for the system user when I use the access token debugger.
What would have caused the system user to be missing these permissions all of a sudden? We are still on the dev tier and have only recently reached the 1,500 calls required to request standard access. That's the only thing I can think of so far, but is that the reason we suddenly don't have the proper permissions, or could it be something else? I haven't read anywhere in the documentation that we would lose these permissions upon reaching 1,500 calls, and I was planning on requesting the standard access next.
Also, I have read in various spots: "You do not need to submit your app if it will only be used by you or by a reduced number of people." That is actually our case, as we are only using a system user for the API calls, and there are only a few users tied to the Facebook ad account. So, do we need to submit our app for review?
Thanks in advance.

Service for getting data from Facebook API approval

not sure if this is strictly programming question (apologies in advance).
We have windows service which is responsible for downloading data from different API's on regular basis, it's just internal tool we are using on our server.
For purposes of oauth2 authentication we use our another tool, which can
handle multiple Oauth logins through different API's, then we just ask this tool for access token and use it in our calls. This works perfectly with e.g. AdWords, BingAds, etc.
Now we have a task to download data from Facebook API. But the problem here is that according to FB we need to apply application for approval in order to get permission to "ads_read" source, which can allow us to download ad insights.
But the problem is that our tool is not an application it does not have any icon, screenshots or Privacy Policy URL. Is there any possibility to get these data without application to FB? Maybe is there another way to login and get the data from user without using oauth2, thus no need for using the oauth2 and scope permissions?
Thanks in advance
As long as you're only using your app with admins/testers/developers of the same app, you don't need to go under Login Review. Only if you also want to authenticate "other" users as well.

Facebook Ads Api Request fails with #273 requires user to be admin

I'm trying to query the Facebook Ads API with the Graph Api Explorer. I have two Ads Account connected to me (if i query /me/adaccounts/ I see both) one is my own and the other one I'm only admin on but not owner.
The Problem is with the one I'm not the owner. If I query my Adaccount with /act_<ACT_ID/stats I get a normal response with the stats back if I query the other account i get:
(#273) This Ads API call requires the user to be admin of the ad account. User <MY_USER_ID> not admin on ad account <ACT_ID>.",
I can see both Adaccounts normal in the Facebook Adsmanager.
What I have done to get the response is:
Create an Facebook App
Added the Adaccount under developer.facebook.com -> myApp -> settings -> advanced -> advertising accounts -> Ads API. Account
open GraphExplorer (https://developers.facebook.com/tools/explorer/)
select my created App
get AccessToken (ads_management, ads_read)
go to url me/adaccounts/
if i click on my adaccount it works if i click on the other i get the #273 error
I don't see what I'm doing wrong if someone could point me in the right direction I would be gratefull.
This may be due to your ad account is inactive or in a bad standing. Additionally if your access level of your ad account is in development level these types of errors may occur. please go through what's mentioned on the doc here
If you upgrade your account to basic or standard access levels this will be solved.
On development access level only end to end workflows are suggested. The following text is extracted from facebook documentation.
The development access level is designed for development purposes and is ideal for people who are just starting to build out their tool. In this level, you would not yet have customers using your tool. This level is open to all developers, and is intended to build out end-to-end workflows on the API before you get full permissions.
A similar issue has been reported on facebook bug reports. you can see the thread here
As #Igy stated it in a comment: "a user has to be the admin of both the ad account and the app (and not just an advertiser or have some other role on the ad account)".
There is 2 places to check that:
the app's roles page, https://developers.facebook.com/apps/[APP_ID]/roles/
the account's peoples page, https://business.facebook.com/settings/people/
Once the user is admin on both side, the API calls will be just fine.
Your business manager doesn't have admin rights. Please check the admin rights of the business manager and also add the app in your business manager to get the report stat(https://developers.facebook.com/docs/apps/business-manager#update-business).

Facebook API V2.0 Extended Permissions for Development and Testing

I'm in the early stages of building a complex application that will tie into Facebook to customize a story using a Facebook user's personal information. I've successfully been able to request basic permissions, grab their name, and include it in the story.
I'm at the point now where I'd like to include some of the user's photos as well, but I'm running into problems with permissions. When I try to get an access_token using user_photos, I'm told that:
"The following permissions have not been approved for use and will not be shown to people using [APPNAME]: user_photos. Submit them for review or learn more."
If I have a look at my Facebook app settings page, I'm told the approval process can take up to 7 days and requires screenshots, and instructions how a reviewer can test my implementation of the desired permissions.
I don't understand how this is supposed to work. It seems like a chicken and egg situation. How can I build my application if I don't have permission to access any photos through the API? How can they test and determine if they want to give me permissions if I can't build the app they need to test?
Is there some testing or development mode I'm missing? Is there a test user I can use? I've tried creating a testing/development version of the application and granting permissions with an admin user, and still no dice.
Thanks for any help.
That is just a warning. You can always ask any user that have a role on the app for any permission