2

我开始使用 google+ API,但我遇到了身份验证问题,即使在 Google Playground 中也是如此。

我想做一件非常简单的事情,就是让我的用户圈出来的人,所以,我使用范围:

/auth/plus.circles.read /auth/plus.me

我要求:

https://www.googleapis.com/plusDomains/v1/people/me/circles

在 Google PlayGround 和 API 页面https://developers.google.com/+/domains/api/circles/list中允许您对其进行测试,他们都给了我回复:

{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "accessNotConfigured",
    "message": "Access Not Configured"
   }
  ],
  "code": 403,
  "message": "Access Not Configured"
 }
}

这很奇怪,因为它说我的访问权限没有配置,但应该是。我什至尝试添加 google+ 域 API 的所有范围...

提前致谢

4

2 回答 2

10

就像 Akash 所说的那样 - 检查 API 是否已启用。Google+ 域 API 与主要的 Google+ API 不同,因此您需要确保两者都已启用:

在 Google Cloud Console 中启用 API

还要确保与您一起测试的用户是域的成员,并且您具有适当的权限。这不是用于一般功能的 API - 它专门用于管理 Google Apps for Business 域中用户的 Google+ 帐户,因此如果您使用 @gmail.com 用户或类似用户对其进行测试,您可能会遇到麻烦。

于 2013-10-14T08:44:25.007 回答
3

As Ian said, you need to enable the Google+ Domains API in the API Console. However, to user the Google+ Domains API, you do not need the Google+ API enabled, as well. These are two distinct services.

Furthermore, to make a request, the request must be authenticated. This means that you either need to make the requests using OAuth 2.0 or through domain-wide delegation of authority. For the Google Playground, you should be able to use OAuth within the playground.

Also, as Ian said, the Google+ Domains API only works for a domain, so make sure that you are testing against a domain that you have access to for OAuth calls, or admin rights to for delegation calls.

于 2013-10-14T15:15:24.533 回答