为什么google oauth2 playground无法返回数据? [英] why is google oauth2 playground failing to return data?

查看:188
本文介绍了为什么google oauth2 playground无法返回数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用谷歌游乐场学习oauth2,我正在尝试此请求:

I'm learning oauth2 using the google playground, I'm trying this request:

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的新手以及它的工作原理。

on the authorization tab I requested access to all yoututbe v3 api scopes and I granted access upon request. I'm assuming I'm forming the query parameters wrong perhaps? I'm new to oauth and how anything about it works.

推荐答案

我相信你需要使用你自己的oauth clientID和secret对于操场上的这个特殊API。如果您单击右上角的齿轮按钮并单击操场上使用您自己的凭据上的复选标记,您应该可以输入您的。

I believe you need to use your own oauth clientID and secret for this particular API in the playground. If you click on the gear button on the right top corner and click the check mark on "Use your own credential" in the playground, you should be able to enter yours.

您可以按照此处的说明获取自己的OAuth凭据: https ://developers.google.com/youtube/registering_an_application

You can get your own OAuth credential by following the instruction here: https://developers.google.com/youtube/registering_an_application

哦,请务必在APIS& amp;给您的应用程序命名并提供电子邮件。当你第一次为你的项目创建OAuth凭证时,AUTH - >开发者控制台中的同意屏幕。

Oh make sure you name your application and provide email under the APIS & AUTH ->Consent screen in the Developer console when you first create you OAuth credential for your project.

你的查询中还有一件事你也没有...你还需要指定一个过滤器。看看你是否至少可以使这个工作:

And there is one thing missing in your query as well... you need specify a filter as well. See if you can at least get this one working:

获取 https://www.googleapis.com/youtube/v3/activities?part=snippet&home=true

这篇关于为什么google oauth2 playground无法返回数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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