Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
AndreCk
8 years agoExplorer | Level 3
How to get OAuth2 access token from OAuth1 token and secret with API v2 using C#
Hi All
Im trying to detirmin if its possible to "convert" OAuth1 token and secret with API v2 in C#
Can anyone share some code in C# How i might go about doing this for a desktop app that needs to access user dropbox accounts
many Thanks
2 Replies
- Greg-DB8 years ago
Dropbox Community Moderator
Using the official Dropbox API 2 .NET SDK, that would look like this:
var appKey = "<APP KEY>"; var appSecret = "<APP SECRET>"; this.client = new DropboxAppClient(appKey, appSecret); var oauth1AccessTokenKey = "<OAUTH 1 ACCESS TOKEN KEY>"; var oauth1AccessTokenSecret = "<OAUTH 1 ACCESS TOKEN SECRET>"; var tokenFromOAuth1Result = await this.client.Auth.TokenFromOauth1Async(oauth1AccessTokenKey, oauth1AccessTokenSecret); Console.WriteLine(tokenFromOAuth1Result.Oauth2Token);
- AndreCk8 years agoExplorer | Level 3
Many Thnaks Greg for your assistance, ;-)
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!