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

oauth.requestToken error 0

Hi im trying to developing a app for ios platform,  i facing some issue with OAuth,   I'm using this tutorial as guide line : https://github.com/KaranRajpoot/FitBit  ,

 

in that code i chaged the API Key and Secret Key but after pressed the login button i didnt get any update,

 

so i tried to debug it, while debuging i saw the follwing  response from fitbit server :  

oauth.requestToken error 0

 

so i couldn't able to get the  oauth_token_secret and oauth_token,

 

 

so im stuck at this point, so can anyone help me to fix the issue?

 

Thanks!

Best Answer
0 Votes
4 REPLIES 4

Hello,

Please visit this page for more details about oauth 1.0a flow: https://wiki.fitbit.com/display/API/OAuth+Authentication+in+the+Fitbit+API

Also check out fitbit oauth 1.0a debug tool: https://dev.fitbit.com/apps/oauthtutorialpage

it will help you to understand where excactly error is happening in your code.

Ivan Bahdanau
Senior Software Developer at Fitbit
Best Answer
0 Votes

Thank you for your reference.

 

We tried all possibilities but we getting the following response

 

"errors":[{"errorType":"oauth","fieldName":"n/a","message":"No Authorization header provided in the request. Each call to Fitbit API should be OAuth signed"}],"success":false}

 

Later we came to know from the forum https://groups.google.com/forum/#!msg/fitbit-api/KKEZhAQKXeQ/rK2SywrEDZIJ , Mentioned that some problem in api. We using the eg., from https://github.com/KaranRajpoot/FitBit. This example is created 9 months ago from today.

 

Please guide how to get the latest api for fitbit ios or if there any sample url please share that also.

 

Thank you

Best Answer
0 Votes

I suggest you email the creator of that library, their email is listed in the readme for the project or altneratively create an issue (https://github.com/KaranRajpoot/FitBit/issues)

Best Answer
0 Votes

[No Authorization header provided in the request] means you're not providing Authorization header. There are three ways to properly sign API request as specified here: http://oauth.net/core/1.0a/#consumer_req_param. 

Fitbit uses first approach that is described at 5.4.1 in the link above. Please make sure that the library you're using accepts this method of passing parameters and also make sure that you configure this library properly so it uses Authorization header. As Dan mantioned above it also makes send to contact library creator.

Ivan Bahdanau
Senior Software Developer at Fitbit
Best Answer
0 Votes