You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

Pelleman's avatar
Pelleman
Explorer | Level 4
3 years ago

How to create oauth2 access token from code?

Hello, I have written a backup solution and want to automatically post the backup file (a zip) to my Dropbox account every day when backup finishes. How can I create an auth2 token by code and use ...
  • Здравко's avatar
    Здравко
    3 years ago

    Hi Pelleman,

    Access token received in whatever way is short lived and can't be used alone for a long time (4 hours, at most). For long term access (solution) you need to get to and store refresh token, which doesn't expire automatically. This token could be used to regenerate access token on demand and use the access token while valid for all regular API calls. For more info how you can get to such a refresh token and how you can automate "refreshing", take a look here. 😉

    Hope this helps.