YouTube Data API returns “Access Not Configured” e

2020-07-04 15:10发布

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.

4条回答
ら.Afraid
2楼-- · 2020-07-04 15:51

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.

查看更多
够拽才男人
3楼-- · 2020-07-04 15:56

Try to start a new Project with new oAuthCliedID & oAuthClientSecret

查看更多
Animai°情兽
4楼-- · 2020-07-04 15:58

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.

查看更多
家丑人穷心不美
5楼-- · 2020-07-04 16:02

Create a new project

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

查看更多
登录 后发表回答