01-05-2021 12:38
01-05-2021 12:38
Hi
I'm trying to use Fitbit for my research and getting data from a bunch of study participants. As client ID is private data, I'd like to access the data without knowing the participants' client ID. However, it seems most manual requires to know the client ID to use API. Is there any way to solve this issue?
Thanks
01-05-2021 15:19 - edited 01-05-2021 15:25
01-05-2021 15:19 - edited 01-05-2021 15:25
Hi @Spring223,
Welcome to the forums!
Do you mean the User ID? When fetching data from a user, you have to specify the Fitbit user's user-id in the endpoint, for example:
GET https://api.fitbit.com/1/user/[user-id]/activities/date/[date].json
However, if you have access to the account you wish to pull data from, you can instead use "-" in place of the user-id in the url.
A client id is your unique oAuth 2.0 application id that should be stored in your application's code. This information is used in part with your client secret as a Basic Base64 token in the authorization header for endpoints used in obtaining an access token and/or refresh token.
A user-id is a unique id associated with a user's Fitbit account. When fetching data from a user, their user-id must be specified in the endpoint (above) to ensure that you're pulling data from the correct user. There isn't a way to pull user data without specifying their user-id, unless you had physical access to that account and logged in.
I hope this helps. Let me know if you need additional clarification.
01-10-2021 22:47
01-10-2021 22:47
Hi JohnFitbit. Thanks for the clarification.
What I have in my mind is this:
1) Study participants log in to Fitbit
2) Authorization page to access data is showing up
3) Participants see their weekly step count
About your suggestion, I think I'd use "-" instead of "[user-id]. However, still, I think I need to know their access token which requires client ID. Is there any other suggestions?
11-07-2021 04:26
11-07-2021 04:26
Hi @Spring223 ,
Did you find solution to your problem? I am facing the same issue where I need to get data without clientID or need a way to get clientID for potential users for the application.
Thanks
11-10-2021
06:18
- last edited on
11-10-2021
16:25
by
YojanaFitbit
11-10-2021
06:18
- last edited on
11-10-2021
16:25
by
YojanaFitbit
I'm facing with same issue when I want to run my app Modapills as well.
Moderator Edit: Formatting
11-29-2021 13:18
11-29-2021 13:18
Hi @voliotDev and @modapillsriver,
Hopefully, this clears up the confusion.
The client ID is the id associated with the application. You will need this and specify it in your application code. To find the client ID, log into your dev.fitbit.com account, select the application which will be used to pull the data and the client ID will be displayed on the summary page. If you have not registered an application yet, you will need to do this. See https://dev.fitbit.com/build/reference/web-api/developer-guide/getting-started/ for help.
If you actually mean the user ID, then this is possible. Instead of providing the user id in the endpoint syntax, use "-" instead. When the call is executed, Fitbit will use translate the hyphen to the user id specified in the access token.
Best,
Gordon