Google OAuth API to get user's email address?

前端 未结 11 819
栀梦
栀梦 2020-11-29 01:38

I am playing with Google\'s OAuth 2.0 Playground using my own personal Google account, but I cannot seem to recover my Gmail address using the playground.

The scope

11条回答
  •  迷失自我
    2020-11-29 01:52

    You'll want to add the https://www.googleapis.com/auth/userinfo.email scope or replace https://www.googleapis.com/oauth2/v2/userinfo with it. If you're using the HTML example they provide, you can list multiple scopes separated by a space.

    
    

提交回复
热议问题