Xamarin.Essentials.WebAuthenticator and Dropbox

Brian Waters 1 Reputation point
2021-01-21T17:46:11.627+00:00

I don't seem to be able to find the correct combination of settings to use WebAuthenticator to login to Dropbox (API). Has anyone been able to get this to work? If so, how is the value set for the redirect uri in the Dropbox app configuration and what value is specified for the redirect uri in the AuthorizeAsync() call?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,364 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JarvanZhang 23,961 Reputation points
    2021-01-22T07:44:49.55+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    The WebAuthenticator API consists mainly of a single method AuthenticateAsync which takes two parameters: the authorization Url and the call back Url. To authenicate the Dropbox in your application, you need to register your application in the Dropbox platform first. And you could get the Redirect URI there.

       var authResult = await WebAuthenticator.AuthenticateAsync(  
               new Uri(Authorization URL ),  
               new Uri(Redirect URI);  
         
       var accessToken = authResult?.AccessToken;  
    

    For the details, you could google with the keyword as Easy Steps to Access Files in Dropbox and Use Them in a Xamarin App and Easy Xamarin Essentials with Web Authenticator to check the related documentation.

    Best Regards,

    Jarvan Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.