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

Client error response [status code] 400 [reason phrase] Bad Request [url]

ANSWERED

I've be posting addalarm requests with success then suddently last few days, using the same code I'm getting.

Client error response
[status code] 400
[reason phrase] Bad Request
[url] http://api.fitbit.com/1/user/-/devices/tracker/deviceid/alarms.xml

 

I'm sending this  -  array('time' => '11:44+01:00', 'enabled' => 'true','recurring' => 'false','weekDays' => 'MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY'));

 

What's changed on fitbits side?
    

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Try again with 'MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY,SUNDAY'
No spaces between each comma.

View best answer in original post

Best Answer
3 REPLIES 3

Try again with 'MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY,SUNDAY'
No spaces between each comma.

Best Answer

Good observation but still get the error after removing spaces, the code worked before I actually didn't have spaces then was using 'Monday,Tuesday'

 

 

 

 

Best Answer
0 Votes

right I see what's happening it's working now.

 

Previously I was able to make it work with 'MONDAY,TUESDAY' as I wasn't concerned as my settings for recurring were set to false.  Now maybe something changed, server side, so that all the days need  to be included for it to work.

Best Answer
0 Votes