I am trying to send connect to Fitbit from Qliksense to visualize my Fitbit data.
I have the access_token and the API calls are working fine from POSTMAN but not with Qlik.
I get the below error when connecting:
HTTP protocol error 401 (Unauthorized): Requested resource requires authentication.
Answered! Go to the Best Answer.
Best AnswerHi, @JohnFitbit @Synosure,
I was able to resolve the issue as I was passing my access_token with an incorrect header name.
The correct way is:
Name :
authorization
Value:
Bearer your_acces_token
Now I have access to my Fitbit data via Qlik
I'll let you know the steps I used:
1. I registered my app on https://dev.fitbit.com/apps/new
2. After registering your app, you get your user id and you get an OAuth 2.0 Tutorial Page link that you can access and flow the steps to get an access token.
3. Once you have endpoint URL (you can determine the URL from here https://dev.fitbit.com/build/reference/web-api/ based upon what data you want)
and your acces_token you can make API calls (you can test whether it's working on POSTMAN initially).
I'll suggest watching a youtube tutorial for all these steps, I followed the below:
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.
Hi @DeepaliChakre,
Welcome to the forums!
I actually haven't encountered the error "401 (Unauthorized): Requested resource requires authentication" before, so this is new to me. Can you tell me what stage in the authorization process this error is being returned?
Since I don't have any experience with Qlik, can you do additional testing and see if there is a difference between how you are authorizing in Postman vs Qlik? If you like, you PM me a screenshot of your configuration and I'll see how I can help.
Hope to hear from you soon!
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.
Hi @Synosure,
Welcome to the forums!
I haven't encountered this error before. So that I can investigate, can you share the steps you took to reproduce the error? Where in the authorization process are you seeing this error?
Ok, I discovered this API in the webpage https://www.programmableweb.com/api/fitbit-rest-api-v1 and used the "API Endpoint" that is showed in there
that uses this link https://api.fitbit.com/ and there is when it says:
Authorization Error: Invalid authorization token type
Best AnswerHi, @JohnFitbit @Synosure,
I was able to resolve the issue as I was passing my access_token with an incorrect header name.
The correct way is:
Name :
authorization
Value:
Bearer your_acces_token
Now I have access to my Fitbit data via Qlik
I'll let you know the steps I used:
1. I registered my app on https://dev.fitbit.com/apps/new
2. After registering your app, you get your user id and you get an OAuth 2.0 Tutorial Page link that you can access and flow the steps to get an access token.
3. Once you have endpoint URL (you can determine the URL from here https://dev.fitbit.com/build/reference/web-api/ based upon what data you want)
and your acces_token you can make API calls (you can test whether it's working on POSTMAN initially).
I'll suggest watching a youtube tutorial for all these steps, I followed the below: