The gived consumer Key/Secret are invalid - Exception

Oct 23, 2011 at 11:43 PM

I trying to use this code, but I get an exception: "The gived consumer Key/Secret are invalid".
I'm sure the consumer Key/Secret copied correct.
I'm using asp.Net

// Creating the cloudstorage object
CloudStorage dropBoxStorage = new CloudStorage();

// get the configuration for dropbox 
var dropBoxConfig = CloudStorage.GetCloudConfigurationEasy(nSupportedCloudConfigurations.DropBox);

// building credentials for the service
var dropBoxCredentials = new DropBoxCredentials();

// set the information you got from the dropbox team 
dropBoxCredentials.ConsumerKey = "mycustomerkey";
dropBoxCredentials.ConsumerSecret = "mycustomersecret";

// set the information you got from the enduser
dropBoxCredentials.UserName = "myusername";
dropBoxCredentials.Password = "mypassword";

// open the connection 
var storageToken = dropBoxStorage.Open(dropBoxConfig, dropBoxCredentials);


var publicFolder = dropBoxStorage.GetFolder("/Public");


foreach (var fof in publicFolder)
{
HtmlGenericControl ctl = new HtmlGenericControl("li");
ctl.InnerText = fof.Name;
folderlist.Controls.Add(ctl);
}
Can anybody help me?

Coordinator
Oct 24, 2011 at 12:19 AM
Hi,

when did you create the key? If you did it in the last 2 days you have to use our trunk because of the new version of DropBox API. We will release SharpBox 1.2 with adapted support on the weekend.

Dirk

Sent from my iPad

On 24.10.2011, at 00:44, moshfeu <notifications@codeplex.com> wrote:

From: moshfeu

I trying to use this code, but I get an exception: "The gived consumer Key/Secret are invalid".
I'm sure the consumer Key/Secret copied correct.
I'm using asp.Net

// Creating the cloudstorage object
CloudStorage dropBoxStorage = new CloudStorage();

// get the configuration for dropbox
var dropBoxConfig = CloudStorage.GetCloudConfigurationEasy(nSupportedCloudConfigurations.DropBox);

// building credentials for the service
var dropBoxCredentials = new DropBoxCredentials();

// set the information you got from the dropbox team
dropBoxCredentials.ConsumerKey = "mycustomerkey";
dropBoxCredentials.ConsumerSecret = "mycustomersecret";

// set the information you got from the enduser
dropBoxCredentials.UserName = "myusername";
dropBoxCredentials.Password = "mypassword";

// open the connection
var storageToken = dropBoxStorage.Open(dropBoxConfig, dropBoxCredentials);


var publicFolder = dropBoxStorage.GetFolder("/Public");


foreach (var fof in publicFolder)
{
HtmlGenericControl ctl = new HtmlGenericControl("li");
ctl.InnerText = fof.Name;
folderlist.Controls.Add(ctl);
}
Can anybody help me?

Oct 24, 2011 at 12:27 AM

Yes. I created this application today. well I will waiting for SharpBox 1.2.

Can you include Asp.Net C# project for example?

Thank you!