09-24-2016 22:00
09-24-2016 22:00
Hi,
I start playing with fitbit api using python-fitbit, myGET request have a valid response from the server however I can't send POST requests specialy for activity log (POST https://api.fitbit.com/1/user/-/activities.json).
I get always:
fitbit.exceptions.HTTPBadRequest: Either "activityId" or "activityName" should be present
my activity sample looks like :
data = {'activityId': 90009, 'startTime': '12:20', 'durationMillis': 600000, 'date': 2016-09-23, 'distance': 1.5}
Any hint?
Thanks in advance
10-03-2016 17:47
10-03-2016 17:47
Are you POSTing JSON instead of form data?