Discuss Dropbox Developer & API
Hi i'm looking for some advice on how to do the following and what best route of authentication / api end points I should use,
I need to be able to parse a dropbox business folder (can do this via a public shared link) for specific files to download which i then need to migrate data to a backoffice system. This would be a background service without user interaction.
What would be the best way to do this with the API and .net SDK?
Where can I find a sample of exchanging the refresh token for an access token via the .NET API? I have been looking at the repo: https://github.com/dropbox/dropbox-sdk-dotnet
@tribalneck2000 You can find an example of processing the OAuth flow with the .NET SDK here. For example, it uses the RefreshAccessToken method to use a refresh token to get a new access token here.
I think I am misunderstanding what you are saying about offline access - it sounded like you can call the aquire access token once and grab the refresh token and store it permanently since it doesn't expire.. then all you have to do is call RefreshAccessToken after constructing a DropBoxClient with the refresh token as a param (not sure what you are supposed to put in the ctor param for the access token). That doesn't seem to work.
Actually I think I got it, read thru the source, there are ctors with just the refresh token. I had a scoping issue that was returning a 400 error. As long as the refresh token can be used forever, I think I may be good for now.
@tribalneck2000 Thanks for following up. I'm glad to hear you've sorted this out. Yes, refresh tokens don't expire by themselves (though the user or app can revoke them if desired).
Hi there!
If you need more help you can view your support options (expected response time for a 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!