user274823
user274823

Reputation: 129

Google OAuth tokeinfo not returning user details

I am using Google OAuth Playground to generate tokens to test my REST API. I enter profile,email in scope text field of playground. It returns the id_token and use this id_token to get userinfo from link https://www.googleapis.com/oauth2/v3/tokeninfo?id_token as stated here in documentation https://developers.google.com/identity/sign-in/web/backend-auth. But it doesn't return any userinfo in JSON.

Upvotes: 1

Views: 660

Answers (1)

bart
bart

Reputation: 15296

User info can be retrieved using the below endpoint using your access ID.

https://www.googleapis.com/oauth2/v3/userinfo

What you are doing is retrieving token info using id_token which is different from retrieving the user's info (although some returned data overlaps).

Upvotes: 0

Related Questions