YouTube 数据 API 返回“未配置访问权限";错误,虽然它已启用 [英] YouTube Data API returns "Access Not Configured" error, although it is enabled

查看:65
本文介绍了YouTube 数据 API 返回“未配置访问权限";错误,虽然它已启用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我内部使用的网络解决方案来检索基于此示例的 YouTube 视频统计信息 (https://developers.google.com/youtube/v3/quickstart/js) 现在无法工作.不确定它究竟是什么时候发生的,但它在几个月前就可以使用了.

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.

我现在尝试运行未经编辑的示例代码(当然,除了调整 CLIENT_ID),我得到了完全相同的错误:

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."  
}

当我在开发者控制台中检查 YouTube API 时,它显示启用状态,并且与此 API 兼容的凭据包括用于对客户端进行身份验证的 ID.当我重试 API 调用尝试时,我可以看到凭证使用增量的统计信息,这些指标反映了请求的数量,并且还显示错误率为 100%.但是控制台中没有关于这些失败尝试的额外信息来帮助调试问题.

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.

我已经删除并重新创建了 API 密钥和 OAuth 密钥,但这并没有改变任何东西.

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.

推荐答案

新建项目

奇怪的是,创建一个新项目只会让 API 正常工作!

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

这篇关于YouTube 数据 API 返回“未配置访问权限";错误,虽然它已启用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆