我正在集成Google Fit API来跟踪健身活动,我需要显示已登录的用户电子邮件,但无法从Google Fit中获取电子邮件或用户ID之类的用户信息。
我已经找到https://developers.google.com/fit/rest/v1/reference/users/dataSources/get,但是我需要在无法找到的请求参数中添加userId和dataSourceId。
您看错地方了。
您要查找的数据位于:People API v1。
对oAuth使用以下范围:
https://www.googleapis.com/auth/userinfo.profile,https://www.googleapis.com/auth/userinfo.email
以下网址提取数据:https://people.googleapis.com/v1/people/me
使用access_token进行呼叫应该对您有益。享受:)