get the current scope of the users oauth token in Google API?

1.6k views Asked by At

Is is possible to obtain the scope(Google API's) an Oauth token can access?? I have tried searching for it but no luck. However facebook has something called as access token debugger which does the job does google have something similar to it ?

1

There are 1 answers

0
Hans Z. On

you can call Google's tokeninfo endpoint, as in:

curl https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=<access_token>

and get back something similar to:

{
 "issued_to": "<>
 "audience": "<>
 "user_id": "<>
 "scope": "https://www.googleapis.com/auth/plus.me",
 "expires_in": 3245,
 "access_type": "offline"
}