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

Repeated Calories data on users not hitting goals

Hi there 🙂

 

We have a spring boot api that makes calls to the 'Activity Time Series' endpoint, we create our requests on a daily basis for all users. Our requests are for data from the previous day, we are in compliance with different time zones along with testing to ensure that all users have passed over to the next day

We released that when users are not reaching their goals, the data provided by the endpoint is repeating the same number of calories as the previous day.

So when a user doesn't reach their goals for a few days, it keeps repeating the data of the last time the goal was reached.

is this something created intentionally? and if so what would be the best way around it?

 

Thanks in advance for any feedback 🙂

Best Answer
0 Votes
5 REPLIES 5

Hi @A.D.E.G 

 

Do you know if the user is syncing their device every day?   It looks like if the user is not syncing or wearing their device, the minimum number of calories burned when the user is at rest is returned by the APIs.   To see the last time the user synced their device, call the Get Device endpoint for each user.

 

If you're only pulling user data once a day, then you should be able to call the Get Devices endpoint to determine if the user synced their device.   Another solution would be to implement the subscription API.   You'll receive a notification every time the user has new data.  Then you can call the APIs for the data collections that sent a notification to your application.   See https://dev.fitbit.com/build/reference/web-api/developer-guide/using-subscriptions/

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

Hi @GordonFitbit ,

Thank you for your reply 🙂 

We have asked a couple of test users to confirm whether they have disconnected their Fitbit trackers for when we receive these repeated results. 

They replied that they normally wear their trackers day and night, now not all of them open their Fitbit app daily, however they can see their daily results updated on the Fitbit website (not checked daily)

Unfortunately, the subscription api will not fit our use case

 

Best Answer
0 Votes

Hi @A.D.E.G 

 

I've completed some research n my account.   When I don't sync my device, I do received a calorie value through the time series endpoint.   This seems to correlate with the minimum number of calories burned when at rest.  I suspect we calculate this value based on the users profile settings.   

 

My recommendation would be to request the "devices" scope from your users and query the Get Device endpoint to find out their last sync time.   This will let you know if the user is syncing regularly.

 

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

Hi @GordonFitbit 🙂

 

If we start requesting to include the 'settings' scope, wouldn't all our users have to re-register? 

The issue is that the calories are being repeated, we are getting them through the time series endpoint

 

 

 

Best Answer
0 Votes

Hi @A.D.E.G ,

 

The users will need to authorize the "settings" scope before you can pull the data.   My recommendation would be to add the "settings" scope to your authorization string, then send the users back through your authorization flow only once.  Any user who has not consented to "settings" will be prompted with the consent page again and asked to select the scopes they want to consent to share with your application.   The users should not need to revoke consent to your application for this to work.   Also, I would recommend informing your users somehow why they are being presented with the consent screen again.   Something like "We are supporting a new Fitbit scope in our application that will give information about the device paired to the account.  This will assist with troubleshooting sync issues between Fitbit and our application."   Lastly, don't forget to update your Terms of Service and Privacy Policy (if needed).

 

If you have any questions while you test this prior to releasing to production, please let us know.

 

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes