0
votes

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

2
Forbidden means you don't have permissions to access that. - DaImTo

2 Answers

2
votes

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

3
votes

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