简体   繁体   中英

Query several user's Google Fit data via REST API

What would be the right way of asking for the Google Fit info of all my users from my own web application (obviously having their consent)?

I only see the param "userId" within the url path the unique way of asking for several specific users, but as it is stated in the reference manual, it seems that only the "me" value is supported.

...so this means that is not possible to retrieve fitness information from more than one user using the Fit REST API inside a web application?

Any help will be welcome!

You are correct. You'd have to do this one by one. As you can see in the get URI request :

https://www.googleapis.com/fitness/v1/users/userId/dataSources/dataSourceId

there's only one room for userId .

There's also Users.dataSources: list

Lists all data sources that are visible to the developer, using the OAuth scopes provided. The list is not exhaustive; the user may have private data sources that are only visible to other developers, or calls using other scopes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM