Retrieving date of birth with Google OAuth API

后端 未结 2 747
你的背包
你的背包 2021-01-12 02:11

Does any one know how to retrive D.O.B through Google OAuth api? I am able to get other information like name, email, gender by setting the scope as https://www.googleapis.c

2条回答
  •  长情又很酷
    2021-01-12 02:56

    It seems you have to send 2 requests:

    • https://www.googleapis.com/plus/v1/people/me (oauth v1)
    • https://www.googleapis.com/oauth2/v2/userinfo (oauth v2)

    to get both google plus profile data and google account data (there are date of birthday and also locale if you need it)

    I use scribes and it works ok. Set two scopes ("https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/plus.me") and send two requests for both REST links

提交回复
热议问题