YouTube Data API returns “Access Not Configured” error, although it is enabled

我与影子孤独终老i 提交于 2019-12-21 12:10:49

问题


My internally used web solution to retrieve YouTube video statistics that is based on this example (https://developers.google.com/youtube/v3/quickstart/js) now fails to work. Not sure when exactly it happened, but it used to work couple of months ago.

I now tried to run unedited example code (apart from adjusting the CLIENT_ID, of course), and I am getting exactly the same error:

{
    "domain": "usageLimits",
    "reason": "accessNotConfigured",
    "message": "Access Not Configured. YouTube Data API has not been used in project 123 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=123 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
    "extendedHelp": "https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=123" }   ],   "code": 403,   "message": "Access Not Configured. YouTube Data API has not been used in project 123 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=123 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."  
}

When I check the YouTube API in developer console, it shows enabled status, and the Credentials compatible with this API include the ID used to authenticate the client. I can see the statistics for credential use increment when I retry the API call attempts, and the metrics reflect the number of requests and also show that the error rate is 100%. But there is no extra info on those failed attempts in the console to help on debugging the problem.

I have deleted and recreated API key and OAuth key, but that did not change anything.

Had there been any extra info on those errors on the developer console side, for example client quote exceeded, I could see how to fix this. Now I am completely stuck.


回答1:


Create a new project

Weirdly, creating a new project just gets the API to work properly!




回答2:


Try to start a new Project with new oAuthCliedID & oAuthClientSecret




回答3:


What seems to have done it for me after a lot of fiddling was to:

  1. Go to the OAuth consent screen of the project.
  2. Enter an Application name.
  3. Press Save.

Lo and behold, after 5 minutes it started working.




回答4:


The error message is unfortunately a red herring: your project's access to YouTube Data API Services is automatically disabled after a 90 day inactivity period.

You should have received a notice via email regarding this action, which also contains the steps that need to be taken to regain access: please fill out and submit the exceptions form.



来源:https://stackoverflow.com/questions/55299535/youtube-data-api-returns-access-not-configured-error-although-it-is-enabled

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!