是否必须使用 google 应用程序帐户才能使用 Google+ 域 API?

Is it necessary to use google apps account to use Google+ Domain API's?

我正在尝试通过以下 api 调用

获取用户的圈子信息
xhr.open("GET", "https://www.googleapis.com/plusDomains/v1/people/me/circles?alt=json&access_token=" + googleAuth.getAccessToken());

它给出的响应文本为

{"error":{"errors":[{"domain":"global","reason":"forbidden","message":"Forbidden"}],"code":403,"message":"Forbidden"}}

我启用了google+域api

Google+ 域 API 与 Google+ API 不同。

你的问题说你正在尝试寻找 user circle Google+ API 并没有准确地给你这个信息。

API 最接近的是 People.list

https://www.googleapis.com/plus/v1/people/me/people/connected?key={YOUR_API_KEY}

尝试测试合集,看看哪一个更适合您的需求。他们每个人都会给你一份人员名单。您可以在页面底部测试结果。无法取回圈子名称。

Acceptable values are:

"connected": The list of visible people in the authenticated user's circles who also use the requesting app. This list is limited to users who made their app activities visible to the authenticated user.

"visible": The list of people who this user has added to one or more circles, limited to the circles visible to the requesting application.

这个问题可能与你昨天发的问题有关。

正确,Google+ Domains API 方法不适用于 @gmail.com Google 帐户。他们需要 Google 个应用程序帐户。