01-23-2019 00:48 - edited 01-23-2019 00:51
01-23-2019 00:48 - edited 01-23-2019 00:51
After subscribing to ALL events using API below
POST <a href="https://api.fitbit.com/1/user/-/apiSubscriptions/1234.json" target="_blank">https://api.fitbit.com/1/user/-/apiSubscriptions/1234.json</a><br /><code></code>
This is what I get from subscription notification.
[ { collectionType: 'activities',
date: '2019-01-23',
ownerId: 'xxxxxx',
ownerType: 'user',
subscriptionId: '1234' } ]
Some documents suggested that I can get activities from URL below
<a href="https://api.fitbit.com/1/user/xxxxxx/activities/date/2019-01-23.json" target="_blank">https://api.fitbit.com/1/user/xxxxxx/activities/date/2019-01-23.json</a><br /><code></code>
But there's no detail inside this API.
My question is, how can I know WHICH activities actually updates.
Recently my solutions is just go through all types, steps floors distance calories minutesFairlyActive, and see what has been update, using the URL below.
https://api.fitbit.com/1/user/-/activities/${resource}/date/today/3m.json
I am collecting data type like
steps: [
{
dateTime: "2018-10-23",
value: "0"
},
{
dateTime: "2018-10-24",
value: "0"
},
{
dateTime: "2018-10-25",
value: "0"
},
{
dateTime: "2018-10-26",
value: "0"
I don't my solution is a good way .
Looking for help. Any suggestions ?
Thanks so much.
Best Answer02-01-2019 10:18
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.
02-01-2019 10:18
I think I've answered this question for you in a similar post. The Activity endpoint in the documentation is just an example. You can query any Activity, Activity Time Series or Activity Intraday endpoint to retrieve the updated data.
Gordon
Best Answer