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: 

Re: Authorization in UWP apps

Authorization in UWP apps

Alex1347
Helpful | Level 5

As a UWP developer, I ran into the following problem.

With the authorization policy change, Dropbox no longer supports the OAuth2 application authorization flow in web views, nor does it support the Web Authentication Broker. Is there ANY workable solution for a UWP app to authorize a user to get a token to upload/download files to Dropbox storage from a UWP app that works out of the box?

 

I haven't found a way for a UWP app to launch an external browser, execute an OAuth2 flow, and then listen to a redirect URL in response to get a token. Is there ANY workable solution for a UWP listen to a redirect URL in response to get a token ?

4 Replies 4

Greg-DB
Dropbox Staff

Unfortunately Dropbox doesn't currently have an example like this for UWP posted, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.

Mark R.5
Helpful | Level 5

The solution is documented here, using a custom URL scheme. I can confirm that this works:

 

https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/td-... 

Alex1347
Helpful | Level 5

Ok, can you have an example of using a custom URL scheme for then listen to a redirect URL in response to get a token?
I would be very grateful.

Mark R.5
Helpful | Level 5

It would be tricky to give a complete example without a sample project (which it would be good if Dropbox could provide), but I think Greg's explanation of the process in the thread I linked to gives all the information you need to piece it together. I just followed that through carefully, following the links he provided for each stage, and it worked fine. I will link the exact message I am referring to below: 

 

https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/m-p... 

Need more support?