cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you interested in hearing how one of our Community members uses Dropbox for sailing trips? Read all about it 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: 

Cannot Redirect to UWP application with custom URI

Cannot Redirect to UWP application with custom URI

ManojDB
Explorer | Level 3

Hi team,

We initially implemented the WebView in the Xamarin application for all platforms; it initially worked well, but now that the support for WebView is deprecated, we are unable to use the Web view to authenticate Dropbox logins. Further analyzing this issue, we have come across a suggestion to use the built-in browser at the following link:

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

 

The application is calling the browser only when a redirect URI is set to a website. As per the suggestion, we can create a new redirect URI for an application that can be used on the application, but when we implement this URI and load the application, the browser opens with the following error message:

 

ManojDB_0-1716386376345.png

 

Redirect URI on the UWP application:

 

ManojDB_1-1716386376349.png

 

Redirect URI on Dropbox App Console:

 

ManojDB_2-1716386376350.png

 

I have checked this URI with other applications on UWP, and it calls this application without any issues.

Could you check on this and update the details? If possible, a simple sample for this implementation would be appreciated.

6 Replies 6

Greg-DB
Dropbox Staff

Can you share the full URL of the page displaying that error message? That would help for debugging this.

Greg-DB
Dropbox Staff

Thanks for sharing that. From your earlier screenshot, I see that the app is registered for the redirect URI "dbssample://LoadPDFFromURL.UWP/", however in the 'redirect_uri' parameter in this authorization URL, I see that you're using "dbssample://loadpdffromurl.uwp/".

 

Those values need to be exactly the same. So to address this, either update your app to use "dbssample://LoadPDFFromURL.UWP/" in the authorization URL, or register your app for "dbssample://loadpdffromurl.uwp/".

Здравко
Legendary | Level 20

@Greg-DB wrote:

.... So to address this, either update your app to use "dbssample://LoadPDFFromURL.UWP/" in the authorization URL, ...


Haha... 😁 @Greg-DB, can you post some example code doing that? 🧐

Dropbox .NET SDK won't let you. 😉 Take a look here.

By the way... URI components are case insensitive (or should be at least). That's why, .NET lowercase the URI, but Dropbox core seems ignore this! This is Dropbox BUG! 🙂

Let's hope this will be fixed soon.

 

Hi @ManojDB,

In general it's bad idea to use mixed case URIs. By the way we are talking for URI here not for URL - another term mistake. In spite the check should be case insensitive, it's preferable usage of lower case letters as a URI or URL construct!

Instead waiting for Dropbox bug resolve, just make all your strings lower case everywhere. This will solve your issue. 😉

Hope this helps.

Greg-DB
Dropbox Staff

Thanks! I'll ask the team to fix that up.

Greg-DB
Dropbox Staff

Update: we've updated the Dropbox servers to make the relevant matching case-insensitive.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Здравко Legendary | Level 20
  • User avatar
    ManojDB Explorer | Level 3
What do Dropbox user levels mean?