I am developing a C# application which should connect to the user`s Dropbox using the DropNet C# Api. I connect my application like this:
UserLogin login=client.GetToken();
client.UserLogin = login;
String url = client.BuildAuthorizeUrl();
ConnectForm authorizer = new ConnectForm(url);
authorizer.ShowDialog(this);
try
{
UserLogin accessToken = client.GetAccessToken();
this.toolStripStatusLabel1.Text = "connected";
}
catch (DropboxException exc)
{
client = new DropNetClient("API KEY", "API SECRET");
this.toolStripStatusLabel1.Text = "error";
}
My toolStripStatusLabel displays "connected" after this code part and after I try to upload a file (or to create a folder) like this
client.UploadFile("/", "test.txt", File.ReadAllBytes("C:/Users/Me/Desktop/test.txt"));
this.toolStripStatusLabel1.Text = "File uploaded";
it displays "File uploaded" but there are still no files in my Dropbox.. My Dropbox Api Error Log shows some 403 errors but without any further information.
Does anybody know whats wrong here?