我坚持以下
我正在尝试调用 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。
有任何想法吗?非常感谢您的帮助!