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

How to display active alarm in clockface?

Is there a tutorial how to display my active alarm (i.e. 7:30a.m.) on the clockface? I've been fiddling with the companion app, but i've had no success.

 

Im trying to make the GET call to the devices as per these instructions here:

https://dev.fitbit.com/build/reference/web-api/devices/#alarms

 

But i get an error: {"errors":[{"errorType":"system","fieldName":"n/a","message":"Authorization Error: Invalid authorization token type"}],"success":false}

 

This is my code:


let url = "https://api.fitbit.com/1/user/-/devices.json";
fetch(url).then(function(response) {
return response.text();
}).then(function(text) {
console.log("Got JSON response from server: " + text); });

 

Am i going in the right direction? Any direction would be appreciated.

 

Best Answer
0 Votes
1 REPLY 1

You're going to have to get through the oauth stuff. The Settings API oauth button may help, as might this example.

Peter McLennan
Gondwana Software
Best Answer
0 Votes