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

Error 403: disallowed_useragent

When trying to open oauth inside Android application web view with shouldOverrideUrlLoading it gives error "Authorization Error
Error 403: disallowed_useragent"

and lands on screen shown in screenshot with this link.

Best Answer
0 Votes
7 REPLIES 7

Hi @medicalsecurity 

 

Have you tested your authorization URL in a web browser on the Android device outside of your web view application?

 

Best,

Gordon

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

I tested it and it works in Android device outside web view and it worked even it works on web browser too.
It stop working only when it override android web view client to intercept URLs using "shouldOverrideUrlLoading" method.

My authorization url for fitbit is "https://www.fitbit.com/login/transferpage?disableThirdPartyLogin=true&redirect=/oauth2/authorize?cli..."

Best Answer
0 Votes

I don't think you're allowed to use WebView (see here). That page suggests alternatives.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

Thank you for reverting. I am using this web view since last 6-8 months and it worked properly and stopped working since a 1-30 days ago.

Is there any way to continue using the same approach.

Best Answer
0 Votes

The documentation that @Gondwana pointed out hasn't changed in over a year.   The fact that you got it to work was probably a bug that recently got fixed.   

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

Okay thank you for the update. Can you point out to a document or reference which I can look and get the thing working for my case.

Best Answer
0 Votes

I guess you'll need this section for android development: https://dev.fitbit.com/build/reference/web-api/developer-guide/application-design/#Displaying-the-Au....  This should explain what is supported for your environment.   If you need anything else, please let me know.

 

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