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.
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.
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...
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.
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...
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.
Yes. Unfortunately, I don't have a target release date to share yet.
Best Answer