DropBox: can not upload file from my Server to DropBox

Oct 17, 2011 at 9:32 AM
Edited Oct 17, 2011 at 9:39 AM


I can upload file from my local PC by script below:

 CloudStorage dropBoxStorage = new CloudStorage();

            var dropBoxConfig = CloudStorage.GetCloudConfigurationEasy(nSupportedCloudConfigurations.DropBox);

            var dropBoxCredentials = new DropBoxCredentials();

            dropBoxCredentials.ConsumerKey = @"XXXXXXXXXX";
            dropBoxCredentials.ConsumerSecret = @"XXXXXXXXX";

            dropBoxCredentials.UserName = @"XXXXXX@gmail.com";
            dropBoxCredentials.Password = @"XXXXXXXXXXX";

            var storageTokenCode = dropBoxStorage.Open(dropBoxConfig, dropBoxCredentials);

            ICloudDirectoryEntry root = dropBoxStorage.GetRoot();
            ICloudDirectoryEntry folder = dropBoxStorage.GetFolder("FOLDER_NAME", root);
            string fn = Server.MapPath("~/FILE_NAME.pdf");
            dropBoxStorage.UploadFile(fn, folder);

            // close the cloud storage connection
            if (dropBoxStorage.IsOpened)

 Its perfect work in my PC, when I try upload from the my  Server to the DropBox I have error message as: The gived consumer Key/Secret are invalid