This project is read-only.

Saving Access Token

Aug 4, 2011 at 6:22 PM
Edited Aug 4, 2011 at 6:23 PM

I have figured everything out in regards to getting the access token and using it to access my Dropbox accounts...

BUT

I am having a heck of a time getting the access key stored somewhere. Does someone have any ideas or sample code on how to do this....

My main goal is to save the access key in mysql and retreive it for later use.

Thanks

Tim

Aug 4, 2011 at 11:30 PM
Hi,

you should be able to do this like that for storing the token

ICloudStorageAccessToken token = storage1.Open(Configuration, Credentials);

// store the token in a stream
Stream tokenStream = storage1.SerializeSecurityToken(token);

Just store the token stream as BLOB or Base64 text into your DB. To restore the token your can use the following code

// read the token
ICloudStorageAccessToken token2 = storage2.DeserializeSecurityToken(tokenStream);

// use the token
storage2.Open(Configuration, token2);

A working unittest is also part of the source code so hope this hint helped?

Cheers
Dirk



2011/8/4 b3llb0y <notifications@codeplex.com>

From: b3llb0y

I have figured everything out in regards to getting the access token and using it to access my Dropbox accounts...

BUT

I am having a heck of a time getting the access key stored somewhere. Does someone have any ideas or sample code on how to do this....

My main goal is to sale the access key in mysql and retreive it for later use.

Thanks

Tim

Read the full discussion online.

To add a post to this discussion, reply to this email (sharpbox@discussions.codeplex.com)

To start a new discussion for this project, email sharpbox@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com