通过Google API获取用户信息 [英] Get user info via Google API

查看:216
本文介绍了通过Google API获取用户信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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



我对这些信息很感兴趣:



以获取用户个人资料中的其他信息。

解决方案

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



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



它包含大量内容 - 包括名称,公开个人资料网址,性别,照片等。


Is it possible to get information from user's profile via Google API? If it is possible, which API should I use?

I'm interesting in such information:

Also it would be cool to get other information from user's profile.

解决方案

Add this to the scope - https://www.googleapis.com/auth/userinfo.profile

And after authorization is done, get the information from - https://www.googleapis.com/oauth2/v1/userinfo?alt=json

It has loads of stuff - including name, public profile url, gender, photo etc.

这篇关于通过Google API获取用户信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆