10-08-2015 07:02
10-08-2015 07:02
I'm trying to replicate the "Activity History" under "Recent Exercise" tile on the dashboard. I've tried two different endpoints.
1. "https://api.fitbit.com/1/user/-/activities/date/2015-10-03.json" gets me activity for the day, but never tells me if I played soccer or ran. It only says "tracker" or "logged activity".
2. "https://api.fitbit.com/1/user/-/activities/list.json" returns 0 activities.
Here's what I'm sending.
header = {"Authorization" : str("Bearer " + str(self.accessToken))} payload = {"offset" : "1", "limit" : "100", "beforeDate" : "2015-10-08", "sort" : "asc" } urlHRsecon = "https://api.fitbit.com/1/user/-/activities/list.json" r = requests.get(urlHRsecon, headers = header, params=payload)
And the response.
{u'activities': [], u'pagination': {u'sort': u'asc', u'next': u'', u'limit': 100, u'offset': 1, u'beforeDate': u'2015-10-03', u'previous': u'https://api.fitbit.com/1/user/-/activities/list.json?offset=0&limit=100&sort=asc&beforeDate=2015-10-03'}}
But in the app and webpage I have exercise on the 7th, 6th, 3rd, etc.
Answered! Go to the Best Answer.
10-08-2015 08:11
10-08-2015 08:11
Exercises logged on Fitbit devices do not yet appear in the API—only manually logged activities will be returned. Please see https://community.fitbit.com/t5/Web-API/Potentially-breaking-change-to-Get-Activities-endpoint/m-p/7...
10-08-2015 08:11
10-08-2015 08:11
Exercises logged on Fitbit devices do not yet appear in the API—only manually logged activities will be returned. Please see https://community.fitbit.com/t5/Web-API/Potentially-breaking-change-to-Get-Activities-endpoint/m-p/7...
10-08-2015 08:58
10-08-2015 08:58
Fair enough. This is something you plan to integrate at some point?
10-08-2015 09:16
10-08-2015 09:16
Yes. Unfortunately, I don't have a target release date to share yet.
10-08-2015 14:35
10-08-2015 14:35
Looking forward to it.