We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

Jack295's avatar
Jack295
Explorer | Level 3
5 years ago

Can't login with C# WebBrowser

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

  • 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.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    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's avatar
      Jack295
      Explorer | Level 3
      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-Token-from-a-user-on-Windows/td-p/205702
      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's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff

        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.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,877 PostsLatest Activity: 41 minutes ago
325 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!