I have a lot of sleep data in my iOS app this week, but when I call the api for data:
https://api.fitbit.com/1/user/-/sleep/minutesAsleep/date/today/1w.json, or
https://api.fitbit.com/1/user/-/sleep/startTime/date/today/1w.json, or even
https://api.fitbit.com/1/user/[user-id]/sleep/date/2016-10-14.json
all I get is zero values.
Edit:
I was logged in with incorrect user credentials, coming from a cookie from a another user of my phone. I had to add prompt-parameter to authorize url to get rid of this cookie in the webview.
Best Answer
Community Moderator Alumni are previous members of the Moderation Team, which ensures conversations are friendly, factual, and on-topic. Moderators are here to answer questions, escalate bugs, and make sure your voice is heard by the larger Fitbit team. Learn more
@henkiejan wrote:
Edit:
I was logged in with incorrect user credentials, coming from a cookie from a another user of my phone. I had to add prompt-parameter to authorize url to get rid of this cookie in the webview.
@henkiejan I assume that means you're getting correct values now? If not, let me know.
Best Answer