Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

API access after data collection starts

Hello experts,

 

I am totally new to FITBIT web API so my question sounds very naive. My research team is about to start research with Fitbit data collection. Our research team is working on a Python script to access and download data via fitbit Web API, but probably need more time to complete it. We were wondering if the user is able to authorize API access after data collection starts. In our research, we ask participants to sign consent forms before data collection.

 

For example, if the first subject starts wearing a device like 12/1/2022 (provided written consent at that time) and ends 12/31/22, then can I access this subject data 1/14/2023?

 

Best Answer
0 Votes
1 REPLY 1

Hi @jchang,

 

Welcome to the forums!

 

I think you might have it backwards. Data collection does not start until after the Fitbit user authorizes your application to pull their data. Authorization begins when your application presents the oauth2 authorization url to the Fitbit user, with the scopes of data you are requesting to pull. Once the user consents to share that data with your application, you receive an access token containing the scopes they shared, when the token was issued, and when the token will expire. See Authorization.

 

As for your example, if you have written consent from the user to only pull data from those specified dates, you should comply. The Web API does not restrict when you can pull data, as long as you have a valid access token from that user. With a valid access token, you can pull data before or after the dates you specified. If you have consent to pull data up to a certain date, you should provide clear instructions to ask the user to revoke access to your application at the end of the study, otherwise you'll continue to be able to access their data. Alternatively, you can force the revoke on your end using the Revoke Token endpoint.

 

As you are just beginning your study, I recommend checking out the following links to help you get started

:

Let me know if you have any additional questions.

 

Best Answer
0 Votes