oauth - 通过Google API获取用户信息

标签 oauth google-api userinfo

是否可以通过 Google API 从用户的个人资料中获取信息?如果可以的话我应该使用哪个API?

我对此类信息感兴趣:

此外,从用户的个人资料中获取其他信息也很酷。

最佳答案

将此添加到范围 - https://www.googleapis.com/auth/userinfo.profile

授权完成后,从-https://www.googleapis.com/oauth2/v1/userinfo?alt=json获取信息

它有很多东西 - 包括姓名、公开个人资料网址、性别、照片等。

关于oauth - 通过Google API获取用户信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7130648/

相关文章:

java - Spring security oauth2 - 无法访问/oauth/token 路由

authentication - 当 "Authorization Code"流运行良好时,为什么 OAuth2 中存在 "Implicit"流?

java - Spring Boot - OAuth2 - 所有请求都被禁止

ios - Google Map API 方向键(iOS 应用程序)

ADFS 4.0 (2016) OpenID Connect 用户信息端点在提供访问 token 时返回 401

Github oauth多重授权回调URL

javascript - Google map Javascript API/街景 FOV

Node.js - 我不断收到以下错误 : Error: ffmpeg stream: write EPIPE

java - 通过OAuth2、Spring授权后无法获取UserInfo

java - 获取 Facebook 用户数据