Nimo
Nimo

Reputation: 8284

How to see a Google+ user's circles with google-api-python-client

I'm trying to access a user's circles in this way:

from apiclient.discovery import build
service = build('plus','v1',developerKey=my_developer_key) # <-- NOT the user's token
people_request = service.people().list(userId=my_gplus_id, collection='connected')
all_people = people_request.execute()

The user approved the following scope:

'https://www.googleapis.com/auth/plus.login',
'https://www.googleapis.com/auth/userinfo.email',
'https://www.googleapis.com/auth/userinfo.profile'

But I'm getting this error:

<HttpError 403 when requesting https://www.googleapis.com/plus/v1/people/107512995392892664693/people/connected?alt=json&key=... returned "Forbidden">

Any ideas? Thanks~!

EDIT: I tried the same with google's JS API. It doesn't use the "key" url param but instead uses a "bearer" header with the user's access token, perhaps I'm using the wrong token?

Upvotes: 0

Views: 255

Answers (1)

abraham
abraham

Reputation: 47833

The only supported userId is me for the currently authenticated user.

Upvotes: 1

Related Questions