aarondcoleman / Fitbit.NET

Fitbit .NET API Client Library
MIT License
193 stars 138 forks source link

Activity Update Goal Endpoint Change #314

Closed aarondcoleman closed 1 year ago

aarondcoleman commented 1 year ago

Fitbit has changed the endpoint that updates the user's goals. It's now passing the goal info in the URL and it's of format type=caloriesOut&value=1000 instead of caloriesOut=2000 for example.

Docs: https://dev.fitbit.com/build/reference/web-api/activity/create-activity-goals/

Their example. curl -X POST "[https://api.fitbit.com/1/user/-/activities/goals/daily.json?type=steps&value=10000"](https://api.fitbit.com/1/user/-/activities/goals/daily.json?type=steps&value=10000%22) \ -H "accept: application/json" \ -H "authorization: Bearer <access_token>" \ -H "content-length: <message_body_size>"