【问题标题】:oAuth2 Playground YouTube Analytics API is not enabled for your project [duplicate]您的项目未启用 oAuth2 Playground YouTube Analytics API [重复]
【发布时间】:2015-10-30 17:08:29
【问题描述】:

我被以下问题困住了

我正在尝试调用 YouTube Analytics API

我去了谷歌的oAuth2游乐场https://developers.google.com/oauthplayground,第一步我选择并授权了所有与youtube相关的API,如屏幕截图所示

然后在第 2 步中,我将自动化代码交换为令牌,在第 3 步中,我将以下请求发送到 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

而我得到的是

{ "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", } ] } }

但我启用了 YouTube 分析 API。

有什么想法吗? 非常感谢您的帮助!

【问题讨论】:

标签: oauth2-playground youtube-analytics-api


【解决方案1】:

我们只是没有为 OAuth 2.0 Playground 使用的默认凭据启用此 API。正如另一个答案所暗示的那样,您始终可以为启用了 Youtube Analytics API 的项目提供自己的凭据。不过,我也刚刚为默认/演示凭据启用了 API,因此您可以再次尝试您正在做的事情,现在应该可以正常工作了。

【讨论】:

  • 谢谢 Nivco。我刚试过,效果很好
猜你喜欢
  • 2014-04-02
  • 1970-01-01
  • 2019-09-07
  • 2019-03-03
  • 2015-07-23
  • 2021-06-15
  • 2016-05-05
  • 2015-07-20
  • 1970-01-01
相关资源
最近更新 更多