Reputation: 6364
I am using OAuth2.0 to connect to Google and trying to get the user details. I am getting email id , etc. But I am not able to get the name and other data from the access_token which I receive.
Currently I am using scopes - 'https://www.googleapis.com/auth/plus.me','email'
.
I know there is a scope https://www.googleapis.com/plus/v1/people/me
but when I use this, I get invalid scope error. However , I manually access https://www.googleapis.com/plus/v1/people/me?access_token=# then it works just fine. But through the API it is not working :(
Any leads ?
I am instantiating the $client
as new Google_Client();
by using the Google Api for PHP.
Upvotes: 0
Views: 1792
Reputation: 8183
Use profile
and email
as scopes, https://www.googleapis.com/plus/v1/people/me
is not a scope, it's an API.
Upvotes: 1