cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

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

Can't login with C# WebBrowser

Can't login with C# WebBrowser

Jack295
Explorer | Level 3
Go to solution

Dear support, 

I'm using WebBrowser control to get the token with the Uri generated by DropboxOAuth2Helper.GetAuthorizeUri method. However, when the webbrowser_Navigated event fires, it stucks at this Url 

https://client-api.arkoselabs.com/v2/419899FA-7FAF-5C1D-C027-BC34963E3A4F/enforcement.d9ade689f93c4fc07fd512409028d0c9.html

I believe this is the Url for recaptcha ?

I notice this problem today, I've been using this method to get the token without any problem before. 

 

Regards

Jack

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

I don't know specifically what changed, but we have found that web views are much more prone to incompatibilities which can lead to issues like this, which is part of the reason for the current policy.

View solution in original post

6 Replies 6

Greg-DB
Dropbox Staff
Go to solution

Note that per the documentation, your app should process the OAuth app authorization flow in the system browser, not a web view control like this. Unfortunately, given that web views are not officially supported, I'm afraid we can't offer help with this issue. 

That being the case, please update your app to send the app authorization flow through the system browser instead. 

For .NET in particular, we recommend using the official Dropbox API v2 .NET SDK. That comes with a helper you can use for processing the OAuth flow in the system browser, as shown in this example.

Jack295
Explorer | Level 3
Go to solution
Hi Greg,
Thank you for your response. I'm using the official DropBox API v2 .NET SDK in my Winforms app. I haved looked at the samples on github before posting this question.
There is a problem with the sample: it needs to run with elevated privilege (aka run as administrator) for the HttpListener to work, or else I would get an access denied exception. This is not possible for my end users because not all of them are allowed to run as administrator.
I found this question https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Facing-problems-getting-the-Access-Toke...
This user was using WebBrowser control to get the token and you did not mention that it was not supported. So why now?

Greg-DB
Dropbox Staff
Go to solution

That post is several years old and is no longer up to date.

 

If that setup with the redirect/listener doesn't work for your use case, you can also omit the redirect URI/listener, in which case the user will be presented with the authorization code that they can copy/paste into your app to finish the flow.

Jack295
Explorer | Level 3
Go to solution

Hi Greg,

 

Just coming back to my initial question, my app has been working fine with the current setup until yesterday. Does that mean the 

https://client-api.arkoselabs.com

stop supporting WebBrowser control without notice? 

Greg-DB
Dropbox Staff
Go to solution

I don't know specifically what changed, but we have found that web views are much more prone to incompatibilities which can lead to issues like this, which is part of the reason for the current policy.

Jack295
Explorer | Level 3
Go to solution

Thanks Greg. 

 

I'll try different approach

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Jack295 Explorer | Level 3
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?