Chanda Kumari
Chanda Kumari

Reputation: 53

How to get userId for Google Fit API?

How to get userId for getting the activity data of the user from google fit API. GET https://www.googleapis.com/fitness/v1/users/userId/dataSources/dataSourceId I can able to get my data by replacing userId with me but I want to create an application for other users.

Upvotes: 2

Views: 1356

Answers (1)

Andy Turner
Andy Turner

Reputation: 140484

As stated in the documentation, the only supported value for the user id is "me".

The identity of the user that "me" refers to is conveyed by the OAuth token you pass with your request.

If you want to access the data for a user, they will need to grant an OAuth token to you.

Upvotes: 2

Related Questions