oAuth2 Playground YouTube Analytics API is not enabled for your project [duplicate] - oauth2-playground

This question already has answers here:
why is google oauth2 playground failing to return data?
(2 answers)
Closed 7 years ago.
I'm stuck with the following
I'm trying to make a call to YouTube Analytics API
I went to google's oAuth2 playground https://developers.google.com/oauthplayground and in the first step I selected and authorized all the youtube related APIs as seen in the screenshot
Then on step 2 I exchanged the autorization code for tokens and on step 3, I send the following request to the API
https://www.googleapis.com/youtube/analytics/v1/reports?ids=channel%3D%3DMINE&start-date=2007-05-01&end-date=2015-06-30&metrics=estimatedMinutesWatched%2Cviews%2Clikes%2CsubscribersGained
And what I get back is
{
"error": {
"code": 403,
"message": "Access Not Configured. The API (YouTube Analytics API) is not enabled for your project. Please use the Google Developers Console to update your configuration.",
"errors": [
{
"domain": "usageLimits",
"message": "Access Not Configured. The API (YouTube Analytics API) is not enabled for your project. Please use the Google Developers Console to update your configuration.",
"reason": "accessNotConfigured",
}
]
}
}
But I have the YouTube Analytics API enabled.
Any ideas?
Thank you very much for your help!

We simply hadn't enabled this API for the default credentials used by the OAuth 2.0 Playground. As the other answer suggests you can always provide your own credentials with a project that has the Youtube Analytics API enabled. However I've also just enabled the API for the default/demo credentials so you can try again what you were doing and things should work now.

Related

How to get overall star rating of Facebook page from Facebook Graph API?

I am trying to make a very simple request to Facebook's Graph API using this URL:
https://graph.facebook.com/v2.12/1984193321812400?fields=overall_star_rating&access_token=205658113371329|gYdP-nDHNVENlwVxria21Uczgs8
All I want from Facebook is the overall_star_rating of my Facebook page. However, this is what I get:
{
"error": {
"message": "(#200) Access to this data is temporarily disabled for non-active apps or apps that have not recently accessed this data due to changes we are making to the Facebook Platform. https://developers.facebook.com/status/issues/206742313468873/",
"type": "OAuthException",
"code": 200,
"fbtrace_id": "A9XRfTkh3WR"
}
}
Since I am completely new to Facebook Graph API: Is the request I am making correct or am I missing something really fundamental here?
And yes, I read Facebook's issue report, but I don't find it very helpful since I set my app to active already and it's not working anyway.
Thanks for any help in this matter.
Since Facebook is undergoing major changes, they have revoked few access to non active apps. Get the access_token from any frequently used app, your Graph API call is pretty correct!
But the Page ID seems to be wrong, as it shows me error after adding a working token.
Error : "message": "(#803) Some of the aliases you requested do not
exist: 1984192327815400"
After changing the Page ID, and adding active app token, it shows the correct result.

cannot subscribe FB page to FB app recently

I have a FB app that works well before. It allows users to subscribe their pages to our app.
Recently, I got the error below when trying to subscribe a page to our app:
'Access to this data is temporarily disabled for non-active apps or apps that have not recently accessed this data due to changes we are making to the Facebook Platform.'
I am using this request url: https://graph.facebook.com/me/subscribed_apps?access_token=xxx
It worked great before but not for now.
However, when I try to submit the same request with the
https://developers.facebook.com/tools/explorer
it works.
Anyone canshow me how can I fix this problem?
Thanks,
Thanh
Have the same issue here. My APP uses Facebook Graph API to import events. Credentials for APP (token) was enabled a long time ago....
Now seems its throwing and error also at https://developers.facebook.com/tools/explorer/1405126029586258?method=GET&path=157956504840454%2Fevents&version=v2.12
Nether my APP or Graph API is working. Below the error message....
{
"error": {
"message": "Unsupported get request. Object with ID '157956504840454' 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": "EHCB6/XyJsA"
}
}
Same error on my app at Wordpress to import events
Message from Facebook answering the question...
As we begin enhancing our new app review process and make changes to our platform, the Events, Groups, Pages and Instagram APIs will no longer be available to new developers. Testing of our more robust process starts today and the new process should resume in a few weeks, but apps currently accessing Events and Groups APIs will lose access today. Going forward, access to these APIs will require a formal app review and for apps using the Pages API, submission is required within 90 days once app review resumes or access will be removed.
https://developers.facebook.com/blog/post/2018/04/04/facebook-api-platform-product-changes

Facebook Ads Insights API: (#3) Application does not have the capability to make this API call

I am trying to pull Facebook Ads metrics through the Facebook Marketing API. The flow is basically that I wish to pull all the account ids of my company, and then loop over them, retrieving the insights for them individually.
However I have an error which I am not able to solve/comprehend.
When I attempt to make the API call (both in the Graph Explorer and my Alteryx workflow):
GET-> /v2.8/act_<Account_ID>/insights
I get the following error:
"error": {
"message": "(#3) Application does not have the capability to make this API call.",
"type": "OAuthException",
"code": 3,
"fbtrace_id": "BNevVWUExDg"
}
I must admit that I am quite at a loss what is causing this error...and actually also exactly what the issue is...am I lacking the right scope/permissions for my token?
With the same token I am able to correctly call the API to get a list of all adaccounts (GET-> /v2.8/me/adaccounts ).
Anyone have an idea what my issue might be?
You have to make sure that your particular access token has the permissions ads_management or ads_read.
This is from the Marketing API quickstart. https://developers.facebook.com/docs/marketing-apis
There are also rate limits on those API's, but I would expect a different error if that was the case.
I ran a POST instead of GET on the same endpoints, which gives me another error about not being admin on the account.
It appears that the user associated with the token (which is a long lived one) was only having analyst access to the account in Business Manager. After I changed it to advertiser it seems I can do the GET call.
In my case, I added a new development user in the roles page. Then I was trying to do OAuth. I got the error message "Application does not have the capability to make this API call."
Here's the way that I solve the problem while your application still in the development mode.
Go to Marketing API > Tools
Then select what token permissions you want. Press "Get Token" button.
Now, you can try to do OAuth again.

Accessing Facebook Ads API request error 270

I have a whitelisted Facebook App that is out of sandbox mode and has been approved for the Ads API, but I am receiving the following error when trying to make requests to the Ads API.
{
"error": {
"message": "(#270) This Ads API request is not allowed for apps with only developer access",
"type": "OAuthException",
"code": 270
}
}
This occurs when using adgroupstats, adcampaignstats, and reportstats requests, etc. The adaccounts request does return my account information though. My dashboard does read "This app is public and available to all users", as I needed to get out of sandbox mode in order for my app to be whitelisted.
Is there another setting that I have missed in order to gain access to the Ads API calls that I need?
Answer:
This is most likely due to your dev/admin accounts of the app not being set as "Admins" in facebook's ad manager. Let me know if this solves this issue for you.
Old response:
I am running into the same issue. Can not run api calls against reportstats even though the user that the app/ad account belongs too was an admin, i change that user to a developer and its still happening.
I opened a bug report for this: https://developers.facebook.com/bugs/786289188058999

Facebook OAUTH error

I am trying to authenticate my application using Facebook PHP SDK. It is working fine, but for some users it will show the following users
{
"error": {
"type": "OAuthException",
"message": "An unexpected error has occurred. Please retry your request later."
}
}
It is creating a access token. But still it shows the errors.
I found the problem in my case.
The users that we receiving the error had activated https for their accounts and my application didn't have SSL activated. So I had to make sure that my app would work properly also over https.
In Facebook you can activate secure browsing by going to your account and (on the left) selecting "security" option.
It took many hours to find the reason and it was found by coincidence when I tried a simplified app that unlike the big one it complained about SSL. But it was the app who complained, Facebook kept sending a really vague error.