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

Fitbit app shows activity and sleep for user but activity and sleep api calls returns 0.

Hello.

I'm using a translator. I'm sorry I'm not good at English.

I am in great trouble so I would like help.

 

Fitbit app shows activity and sleep for user but activity and sleep api calls returns 0.

What is the solution in this case?

 

Similar to this topic.

https://community.fitbit.com/t5/Web-API-Development/Fitbit-app-shows-steps-for-user-but-steps-activi...

Best Answer
0 Votes
3 REPLIES 3

Hi @Mutsumi 

 

There are several reasons why data is not syncing.   I would first confirm the user is consenting to share their data with your application.   If they are, you'll want to verify the user ID used to log into the Fitbit application is the same one who's data you are querying.   Would you let me know what operating system the Fitbit app is running on the mobile device and shows data?   I can provide some instructions for you.

 

Gordon

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

Hi @GordonFitbit 

Thank you for your reply.

 

I would first confirm the user is consenting to share their data with your application.

->The user agrees to sync.

 

If they are, you'll want to verify the user ID used to log into the Fitbit application is the same one who's data you are querying. 

->You are using the same user ID.

 

Would you let me know what operating system the Fitbit app is running on the mobile device and shows data?

->The OS displaying the data is iOS 14.3.

 

Supplementally, the following parameters of the activity API can be recorded.
・sedentary Minutes
・caloriesOut

Also, I can record the user profile and weight.

However, 0 values are returned for items that can be acquired with other activity APIs such as the number of steps and distance. And sleep data is not recorded in the iOS DB. If all of the following data cannot be obtained, it will not be recorded as sleep data.
・logId
・dateOfSleep
・minutesAsleep
・isMainSleep
・startTime

Best Answer
0 Votes

Hi @Mutsumi 

 

Since they are on iOS, would you please check one last thing to confirm they are using the correct account?  Have the user open the Fitbit mobile app and 

  1. Press their profile icon in the upper left hand corner
  2. Press "View my profile"
  3. Press personal and check the user ID listed is the same as the one you are using.

If that is correct, then it should be the correct account.  If the data is displayed in the user's mobile app and you're using the same user id, then there should be data through the Web APIs.   I can help double-check the data.

 

Would you please message me screen shots of their user's phone showing the steps and sleep data?   Also, send me the endpoint your executing and the entire response you are receiving?

 

 

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