05-24-2017 02:54
05-24-2017 02:54
I'm trying to use FitBit.Net to post a timer update. I send the following JSON as content:
{"time":"07:10+02:00","enabled":true,"recurring":false,"weekDays":[],"snoozeLength":5,"snoozeCount":3}
However, this is what I get back:
Üpdate response: BadRequest, reason: Bad Request, content: {"errors":[{"errorType":"validation","fieldName":"snoozeLength","message":"Snooze Length is required"},{"errorType":"validation","fieldName":"recurring","message":"Recurring is required"},{"errorType":"validation","fieldName":"snoozeCount","message":"Snooze Count is required"},{"errorType":"validation","fieldName":"time","message":"Time is required"},{"errorType":"validation","fieldName":"enabled","message":"Enabled is required"}]}
Why am I getting this error, should I be sending the values in a different format?
Thanks!
05-24-2017 08:22
05-24-2017 08:22
@DrPoncho If you're updating an existing alarm, looks like you're missing some stuff.
Here's a good way to try it out:
1. Go to this link here.
2. In the top right, hit "Authorize".
3. Make sure to check the "settings" scope, then scroll down and hit "Authorize" within the popup.
4. Once you've done that, click on "Devices" and play around with those endpoints. Specifically, you might want to look at the "Update Alarm" endpoint (5th one listed under Devices).
Let me know if that helps.
05-26-2017 03:07
05-26-2017 03:07
Thank you for your reply. I've used swagger and it works, but I can't get it to work through fitbit.net in my application.. This is a screenshot of Fiddler from the communication:
The top part is what I'm sending, the bottom is what I'm receiving. It says I didn't include the values, but as you can see they are included ..
05-31-2017 08:28
05-31-2017 08:28
@DrPoncho You're missing the "tracker-id" and "alarm-id".