Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
So I've been trying to use the API as dynamic storage for my portfolio site. Essentially I want to be able to call a folder where I store photos and when the user loads the window for a particular project have it load the photos from a path that I've specified in a JSON object. I've mostly gotten the feature to run, the issue is my Access Token keeps expiring and I want to know if there is a way in Javascript to have a permanent token or to generate one without user interaction. (I'm using the JS SDK at the moment)
Dropbox is in the process of switching to only issuing short-lived access tokens (and optional refresh tokens) instead of long-lived access tokens. You can find more information on this migration here.
Apps can still get long-term access by requesting "offline" access though, in which case the app receives a "refresh token" that can be used to retrieve new short-lived access tokens as needed, without further manual user intervention. You can find more information in the OAuth Guide and authorization documentation. You can find an example of using refresh tokens with the JavaScript SDK here.
The issue is, is that from everything I can tell this is used for calling api access to someone elses files when I'm simply trying to display my own files.
The Dropbox OAuth functionality can be used for any number of users, so this works the same way if there are multiple Dropbox users, or just one. If you're the only Dropbox user, you'd just process this once to get your own refresh token.
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!