NEED TO SAVE REQUEST TOKEN to exchange it into an Access Token

Apr 13, 2012 at 2:47 PM

So, I've set the AuthorizationCallBackUrl, I've got my RequestToken and I got the DropBoxAuthorizationUrl. I then redirect the user to the DropBoxAuthorizationUrl where the user signs into their drop box account and grants access to the application.

DropBox then redirects the user back to the web applicaton via the AuthorizationCallBackUrl. The page loads...... WHAT I NEED IS THE PREVIOUSLY CREATED REQUEST TOKEN so that I can exchange it into an access token and thereby save the access token. However, the Request Token is not Serializable so I can't save it to session, I can't save it to a cookie or to a database. I tried using CloudStorage.SerializeSecurityToken(requestToken), but you need to have an open CloudStorage connection, and to have an open connection you have to have an AccessToken, to get the AccessToken you have to have the original RequestToken...... caught in a bad loop.... don't know what to do.... I must not be understanding something correctly.... Please help!!!

May 18, 2012 at 6:24 PM


Perhaps in the most recent version, RequestToken is now serializable? I was able to do what you need with this:

            requestToken = DropBoxStorageProviderTools.GetDropBoxRequestToken(config, APP_KEY, APP_SECRET);

            //Save token to Session
            Session["requestToken"] = requestToken;