Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Post activity using python-fitbit

 

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
 

 

Best Answer
0 Votes
1 REPLY 1

Are you POSTing JSON instead of form data?

Best Answer
0 Votes