我正在使用Google Play游乐场学习oauth2,正在尝试以下请求:
https://www.googleapis.com/youtube/v3/activities?part=snippet
并收到以下回复:
{
"error": {
"code": 403,
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project.",
"errors": [
{
"domain": "usageLimits",
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project.",
"reason": "accessNotConfigured"
}
]
}
}
在“授权”选项卡上,我请求访问所有yoututbe v3 api范围,并应请求授予访问权限。我假设我正在形成错误的查询参数?我是oauth的新手,它的工作原理如何。
我相信您需要在操场上为此特定的API使用自己的oauth clientID和密码。如果单击右上角的齿轮按钮,然后在操场上单击“使用您自己的凭据”上的复选标记,则应该可以输入自己的凭据。
您可以按照以下说明获取自己的OAuth凭据:https : //developers.google.com/youtube/registering_an_application
哦,当您首次为项目创建OAuth凭据时,请确保为应用程序命名并在“开发者”控制台的“ APIS和授权->同意”屏幕下提供电子邮件。
查询中也缺少一件事……您还需要指定一个过滤器。看看您是否至少可以使这一工作正常进行:
GET https://www.googleapis.com/youtube/v3/activities?part=snippet&home=true
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句