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

Error 500 when setting alarm

 

Here is my request

curl -X POST -i -H 'Authorization: OAuth oauth_consumer_key="b**9f1", oauth_nonce="e390ca4db", oauth_signature="E7Bus8hCIV6fRHvIC7s5K0CMOao%3D\

", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1433131852", oauth_token="50**9ae6", oauth_version="1.0"' "https://api.fitbit.com/1/user/3**2/de\

vices/tracker/33**511/alarms.json?time=12%3A10%2B8%3A00&enabled=true&recurring=false&weekDays=MONDAY"

HTTP/1.1 500 Internal Server Error

Server: nginx

X-UA-Compatible: IE=edge,chrome=1

Expires: Thu, 01 Jan 1970 00:00:00 GMT

Cache-control: no-cache, must-revalidate

Pragma: no-cache

Fitbit-Rate-Limit-Limit: 150

Fitbit-Rate-Limit-Remaining: 141

Fitbit-Rate-Limit-Reset: 2881

Content-Language: en

Content-Length: 196

Date: Mon, 01 Jun 2015 04:11:59 GMT

 

{"errors":[{"errorType":"request","fieldName":"500","message":"An error occurred with the Fitbit API while processing the request. Please contact api@fitbit.com for assistance."}\

\

],"success":false}bash-3.2$

bash-3.2$

 

 

 

Best Answer
3 REPLIES 3

I get this error too. Deleting an alarm works fine but not creating one. Here is my request (I removed my token and tracker id for privacy reasons) and result:

curl -X POST -i -H "Authorization: Bearer [my token]" -d "enabled=true" -d "recurring=true" -d "time=23:00+02:00" -d "weekDays=MONDAY" https://api.fitbit.com/1/user/-/devices/tracker/[my tracker id]/alarms.json

 

HTTP/1.1 500 Internal Server Error
Date: Tue, 04 Apr 2017 21:03:56 GMT
Content-Type: text/plain
Content-Length: 215
Connection: keep-alive
Cache-control: no-cache, private
Content-Language: en
Fitbit-Rate-Limit-Limit: 150
Fitbit-Rate-Limit-Remaining: 150
Fitbit-Rate-Limit-Reset: 3364
X-Frame-Options: SAMEORIGIN
Server: cloudflare-nginx
CF-RAY: 34a737997fb13c35-CDG
{"errors":[{"errorType":"request","fieldName":"500","message":"An error occurred with the Fitbit Web API while processing the request. Error id: 8D655804:7B14_A92D826B:01BB_58E40A3C_C7D17A17:1800"}],"success":false}

Best Answer
0 Votes

API to set alarm seems broken.

Best Answer
0 Votes

@hujaek I used curl and was able to successfully set an alarm:

 

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Bearer {token}' 'https://api.fitbit.com/1/user/-/devices/tracker/{trackerid}/alarms.json?time=12%3A00-08%3A00&enabled=false&recurring=false&weekDays=MONDAY'
Andrew | Community Moderator, Fitbit

What motivates you?

Best Answer
0 Votes