0

I have an G-Suite Account..I have created a project in developer console. In that i have chosen the Oauth client Id credential for Application Type (Others). I have received client secret and Client ID..... Using this i have tried the sample mvc https://developers.google.com/drive/v3/web/quickstart/dotnet I have received the token with Below information

1.access_token 2.Experiences 3.refresh_token 4.Token_Type and so on…

I cant find any user related information (eg: UserId) in the token for Authenticate in our application (used tokeninfo api to validate token). I get below response

{
    "issued_to": "123456789234.apps.googleusercontent.com",
    "audience": "123456789234.apps.googleusercontent.com",
    "scope": "https://www.googleapis.com/auth/admin.directory.user https://www.googleapis.com/auth/admin.directory.user.readonly",
    "expires_in": 3520,
    "access_type": "online"
}

How to get userid in access_token?

1 Answers1

0

If you are try to get their user information you have to add https://www.googleapis.com/auth/userinfo.profile in your scopes.

View your basic profile info


Here is some additional reference:

Hope this helps.

Mr.Rebot
  • 6,703
  • 2
  • 16
  • 91