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

API data unexpected zero values

A majority of accounts (10+) that use my app pull data from the API without an issue.  Two accounts, however, contain zero values, or no values at all, for the sleep and activity endpoints from the API. We have contacted the user and are expecting data.

 

From the header of the request.

"GET https://api.fitbit.com/1/user/" . $FitbitUserCred->encodedId . "/sleep/date/" . $date . ".json"

 

An example json file for sleep that was returned from the API.

{"sleep":[],"summary":{"totalMinutesAsleep":0,"totalSleepRecords":0,"totalTimeInBed":0}}

 

Any advice?  I can provide user id's, etc. to help track the issue.

 

Thanks!

 

Best Answer
0 Votes
1 REPLY 1

@ErichHuebner That means they don't have sleep logged for whatever date you're pulling. Sleep is logged on the day the user woke up, not on the night they went to sleep.

Andrew | Community Moderator, Fitbit

What motivates you?

Best Answer
0 Votes