Hello,
I couldn't find any information regarding this in the documentation: in the subscription notification, what is the meaning of the "date" field? does this relate to the time in which the user started an action (e.g., started a sleep event)? the time in which the user finished an action (e.g., finished a sleep event)? the time in which the user synced the device?
Also, is the date given in UTC or in client time zone?
Thank you in advance!
Answered! Go to the Best Answer.
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Hi @yuval.altman ,
You can execute the Get Profile endpoint, https://api.fitbit.com/1/user/-/profile.json, to find out the time zone. Search for the elements names "timezone" or "offsetFromUTCMillis".
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
"date" in the subscription webhook response is the date when the event took place or ended (in the case of sleep). You should specify this date in the appropriate URI argument to retrieve the data.
Best AnswerThank you for your response, @Gordon-C !
So I understand that the date regards the date of the end of the sleep event, but I'm still wondering whether this date is relative to the user's local time zone, or is it in UTC?
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Hi @yuval.altman ,
You can execute the Get Profile endpoint, https://api.fitbit.com/1/user/-/profile.json, to find out the time zone. Search for the elements names "timezone" or "offsetFromUTCMillis".
Best Answer