Hi,
I was trying to get access token by following the API documentation. Still I am getting 401 Error. can you Please help me out on this ?
Here is my code :
var theUrl="https://api.fitbit.com/oauth2/token";
var params = "client_id=****&grant_type=authorization_code&redirect_uri=********";
xmlHttp.open( "post", theUrl, true);
var clientID = btoa("*****:**************");
console.log("clientID :: "+clientID);
var temp = atob(clientID);
console.log("temp :: "+temp);
xmlHttp.setRequestHeader("Authorization", "Basic "+clientID);
xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlHttp.send( params );
Thanks in advance
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.