问题
We have a user who gave consent for our Cloud Project to read their Fit data through the Android app. We now want user's coach to access their Fit data through a web UI associated with our Cloud Project. Is this possible, and if so, what is the right way to do it?
Can cross-client identity be used? https://developers.google.com/identity/protocols/CrossClientAuth
I was trying to replace "me" with "user@gmail.com" in the REST endpoint but it doesn't work: https://www.googleapis.com/fitness/v1/users/me/... -> https://www.googleapis.com/fitness/v1/users/user@gmail.com/...
Thanks!
回答1:
There is a mechanism for Android apps to obtain offline access for web back-ends highlighted in the CrossClientAuth guide from your question. With offline access, you can theoretically serve or store that data in any way that the user has consented to. Any access controls of that data to another person is something that you'd have to handle on your own.
来源:https://stackoverflow.com/questions/35489763/reading-other-users-google-fit-data-via-rest-api