Forum Discussion

JaideepSingh's avatar
JaideepSingh
New member | Level 2
8 years ago

API v2: Dropbox integration to website

I want to to sync user dropbox account with our website so that user can directly upload their documents from our site.I am using Dotnet and had done following code

 

string appkey = ConfigurationManager.AppSettings.Get("Appkey").ToString();
string appSecret = ConfigurationManager.AppSettings.Get("AppSecret").ToString();
string returnUrl = ConfigurationManager.AppSettings.Get("ReturnUrl").ToString();

var client = new DropboxClient(appkey, appSecret);
var a = client.AccessToken;
client.ReturnUrl = returnUrl;
client.RedirectToAuthorization();

 

It correctly redirect me to dropbox login form and after allowing permission it send back to redirect URl with parameters state and code in query string ,but when I try to use code as access token while uploading file it give error of invalid token.

 

Am I doing something wrong,is code that is return is not the access token,if not then how can i get the access token from it.Please remember that i am using asp.net c#

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,950 PostsLatest Activity: 2 days ago
351 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!