Geeks With Blogs

News
Step-by-Step into the cloud a blog of Dirk Eisenberg (>)

We got a lots of questions how to implement the security access token generation process and how to build a valid way to get an approval from the DropBox team for applications which are implemented with the SharpBox library. Our latest tutorial describes all details how to get an approval for your DropBox application aligned to their terms of use.

You will find the document on our tutorial page here: http://sharpbox.codeplex.com/wikipage?title=SharpBox%20Developer%20Tutorials

Just a couple of hints to increase the approval process:

  • Offer a demo instance of your web application or a demo installation of your fat client application to the DropBox team
  • Add a video of the implemented token creation process to your request for approval
  • Describe what your application is doing and how it uses DropBox very accurate

Have fun with integrating your app and the DropBox services!

Posted on Thursday, September 29, 2011 11:28 PM .NET Coding , Coding , SharpBox | Back to top


Comments on this post: Authorize your application at DropBox and get the approval for public use

# re: Authorize your application at DropBox and get the approval for public use
Requesting Gravatar...
Hi!
Firstly, thank you for Sharpbox, i like it!

I read the tutorial and also a lot on discussion board on codeplex about authorization during my exercises on an test application about dropbox.

I have 2 questions. First, while i am implementing the code in tutorial you linked in this article i get an error "Attempted to perform an unauthorized operation." on line of exchanging request token to access token.

Another question is the procedure that you mention here to get approval for app. Should we get an approval for our app after complete it or the error i get is related with this approval? Cause i dont have any approval except for app key and app secret. and if yes, how can i get this approval?

Left by Sony on Feb 10, 2012 10:39 PM

# re: Authorize your application at DropBox and get the approval for public use
Requesting Gravatar...
Was this question resolved? I'm struggeling with the same issue...
Left by Mikkel on Jul 31, 2012 9:27 PM

# re: Authorize your application at DropBox and get the approval for public use
Requesting Gravatar...
Actually I just resolved this myself - it seems that you must use the EXACT same RequestToken as you used before sending user to Dropbox to authorize when exchanging to the AccessToken.

Therefore you need to store it in cache - eg. in Session like this:

//----------------------------------------------------------------------------

// Get RequestToken
var requestToken = DropBoxStorageProviderTools.GetDropBoxRequestToken(config, _authKey, _authSecret);

// Save in session
HttpContext.Current.Session["requestToken"] = requestToken;

//----------------------------------------------------------------------------

And then use it for getting the AccessToken like this:

//----------------------------------------------------------------------------

// Get RequestToken from session
var requestToken = (DropBoxRequestToken)HttpContext.Current.Session["requestToken"];

// Convert to AccessToken
var accessToken = DropBoxStorageProviderTools.ExchangeDropBoxRequestTokenIntoAccessToken(config, "Key", "Secret", requestToken);

//----------------------------------------------------------------------------

Also be aware that you need to open the Dropbox connection in order to serialize the AccessToken to disk/cache like this:

//----------------------------------------------------------------------------

string path = "C:\DropboxToken.txt";

using(FileStream fs = File.Create(path))
{
// Open connection to Dropbox
ICloudStorageAccessToken storageToken = _dropboxStorage.Open(config, accessToken);

// Serialize the token to disk
_dropboxStorage.SerializeSecurityTokenToStream(accessToken, fs);
}

//----------------------------------------------------------------------------

Hope this helps someone - kept me busy for hours...!

PS: Thanks for a great Cloud Storage API.
Left by Mikkel on Jul 31, 2012 10:08 PM

# re: Authorize your application at DropBox and get the approval for public use
Requesting Gravatar...
CAna anybody guide me plz that does sharebox only works with a console apps. i have my webapplication and want to authorize it using sharebox.Plz guide me i am new developer.
Left by Qurat ul ain on Sep 22, 2012 3:32 PM

Your comment:
 (will show your gravatar)


Copyright © Dirk Eisenberg | Powered by: GeeksWithBlogs.net