Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

Daniel B.97's avatar
Daniel B.97
New member | Level 1
11 years ago

OAuth2 implicit grant (token flow) does not work in IE/.Net Winform WebBrowser

Currently I'm developing a .Net WinForms desktop app.

I initiate a token-based OAuth2 flow with this URL in IE11 (or to be more precise: the WebBrowser control of .Net WinForms):

https://www.dropbox.com/1/oauth2/authorize?response_type=token&client_id=<myappid>&redirect_uri=<myRedirectUrl>oauth_callback&state=<myState>

I can login to an account and apply accept the app request. After that I should be redirected to <myRedirectUrl>

I get two different results:

1. If <myRedirectUrl> is "http://localhost" then I get "dnserror.html" in browser. Thsi should not happen.

2. If <myRedirectUrl> is a real URL I get redirected to the page. But: since it seems to be some JavaScript.Magic to redirect, the page is "redirected/reloaded": neither DocumentCompleted event nor Navigating event is fired. Therefore I never can determine, when the redirected page is displayed in browser. For me the best woult be, if Navigating event would be fired.

What can I do to get the result by code like for other OAuth2 providers?

Regards,
Daniel

24 Replies

Replies have been turned off for this discussion

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

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, Facebook or Instagram.

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!