How to create OAuth2 Rediret URI using DropBox API in C #?

-1

I can not connect to DropBox using Console Application of C# and tried to create Redirect URIs in profile of my app on Dropbox site, but I do not understand much.

In my app, I have http registered

  

WhenItrytoruntheapplicationthroughVisualStudio,Igetauthenticationerror.

Ihavethefollowingcode

publicpartialclassForm1:Form{publicForm1(){InitializeComponent();}privatevoidForm1_Load(objectsender,EventArgse){if(String.IsNullOrEmpty(Properties.Settings.Default.AccessToken)){this.GetAccessToken();}else{this.GetFiles();}}privatevoidGetAccessToken(){varlogin=newDropboxLogin("wbjcj6pa94berli", appKey, "https://www.dropbox.com/developers/apps/info/wbjcj6pa94berli", false, false);
        login.Owner = this;
        login.ShowDialog();

        if (login.IsSuccessfully)
        {
            Properties.Settings.Default.AccessToken = login.AccessToken.Value;
            Properties.Settings.Default.Save();
        }
        else
        {
            MessageBox.Show("Error...");
        }
    }

    private void GetFiles()
    {

    }
}

The truth is that I do not know what to put in this URI , can anyone help me?

    
asked by anonymous 22.12.2018 / 17:54

1 answer

0

There is an example application in the dropbox github to show SDK usage in the application console, there are also other examples for MVC and for Windows 10 Apps:

DropBox_SimpleTest

Apparently he used an HttpClient and an HTML page to get the token via JS, see if the guys' example helps you in using the SDK. You can find more details of the SDK documentation here:

DropBox DotNet SDK

    
02.01.2019 / 02:15