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

房东的猫 提交于 2019-12-12 04:56:44

问题


I am trying to get user's circle info with following api call

xhr.open("GET", "https://www.googleapis.com/plusDomains/v1/people/me/circles?alt=json&access_token=" + googleAuth.getAccessToken());

It gives response text as

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

I have enable google+ domain api


回答1:


Correct, Google+ Domains API methods are not available to @gmail.com Google accounts. They require Google Apps accounts.




回答2:


The Google+ Domain API's is not the same as the Google+ API.

Your question says you are trying to find a user circle the Google+ API doesn't give you this information exactly.

The closes thing to this that the API has is People.list

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

Try testing the collection see which one suits your needs more. They each give you back a list of people. You can test the results at the bottom of the page. There is no way to get the name of the circle back.

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.

This question is probably related to the one you posted yesterday. Get list of circles of a user using Google Plus API



来源:https://stackoverflow.com/questions/29693375/is-it-necessary-to-use-google-apps-account-to-use-google-domain-apis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!