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

Unable to get authorization code through redirect url

I am integrating fitbit into my android studio project via scribejava, but unable to get authorization code through redirect url. My redirect url is com.example.myfitbit://fitbit
If i use different redirect url which is http://127.0.0.1:8080/  I am getting code in chrome but not in my android project. It shows my an error that no such line or element found for 

final String code = in.nextLine();

Please help me. Thanks! 

Best Answer
0 Votes
1 REPLY 1

Hi @Shivi5 

The authorization code should be attached to the redirect URL, just like with Chrome.  This problem seems more like a coding issue.   Maybe someone here who has worked with Android Studio would be able to tell you how to extract the authorization code from the redirect_uri.

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes