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

Updating Steps goal - Fetch POST

What is the correct process to change the Steps goal from the companion.

 

This code runs successfully but the goal doesn't change in the Fitbit App, even after syncing.

 

let url = 'https://api.fitbit.com/1/user/-/activities/goals/daily.json?type=steps&value=20000';
fetch( url,
{
method: 'POST',
headers: new Headers({
'Authorization': 'Bearer ' ,
}),
mode: 'cors',
}
).then({console.log('Success');});
.then(function(data){ console.log('Request succeeded with response', data);})
.catch(function(error){ console.log(error.message);});
}

Author | ch, passion for improvement.

Best Answer
0 Votes
1 REPLY 1

Hi @Guy_,

 

After doing a bit of research, I found out that a month ago, we identified a caching issue with the Create Activity Goal endpoint, where updating the goal via the endpoint will not reflect in the app after syncing. We're currently looking into this and I'll let you know you know when we have an update.

 

Best Answer
0 Votes