Posts

Showing posts from November, 2020

Validate Google access token?

  For user check, just post get the access token as accessToken and post it and get the response https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=accessToken you can try in address bar in browsers too, use httppost and response in java also response will be like { "issued_to": "xxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com", "audience": "xxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com", "user_id": "xxxxxxxxxxxxxxxxxxxxxxx", "scope": "https://www.googleapis.com/auth/userinfo.profile https://gdata.youtube.com", "expires_in": 3340, "access_type": "offline" } The scope is the given permission of the accessToken. you can check the scope ids in  this link Update:  New API post as below https://oauth2.googleapis.com/tokeninfo?id_token=XYZ123 Response will be as { // These six fields are