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
cfishere
3 years agoExplorer | Level 3
Non expiring token kept on changing
So i tried following this article about obtaining my perm app token. I did the exact steps. but it always gives me a different Token when i try to access the link
https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Tokens-only-valid-for-4-hours-from-app-console/td-p/425269
am I doing something wrong here? it feels very confusing.
- Greg-DBDropbox Staff
If you are referring to processing the OAuth app authorization flow, note that each time you do so, you will get a different access token (and refresh token, if you're requesting one). These values are expected to be different each time. You only need to process this flow when needed though. For instance, if you are requesting "offline" access, and so are receiving a refresh token, you should store and re-use the resulting refresh token, without processing the app authorization flow again.
If you haven't already, I recommend reading the following resources for more information on this:
- https://developers.dropbox.com/oauth-guide
- https://www.dropbox.com/developers/documentation/http/documentation#authorization
- https://dropbox.tech/developers/migrating-app-permissions-and-access-tokens
If something isn't working as expected or if you're still stuck on something, please show us what the problem is and we'll be happy to help however possible.
- cfishereExplorer | Level 3
Hey there, this still isn't really working. the problem is the call for token just always expires so I cannot be able to get the code running for longer than 4 hours. please help
- Greg-DBDropbox Staff
Dropbox is switching to issuing short-lived access tokens (and optional refresh tokens) instead of long-lived access tokens, so this is expected. You can find more information on this migration here. That being the case, you will get a short-lived access token by default. (You can identify a short-lived access token by the "sl." prefix.)
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.
While the change to only issue short-lived access tokens began on September 30th, we're releasing it gradually, so you may not have seen your app(s) affected until now. Once it applies to your app, it would apply regardless of the "Access token expiration" setting for your app, and that setting may no longer be available for your app.
Note that if you are not the programmer responsible for this integration, you may need to get an update from them to support this.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,911 PostsLatest Activity: 4 hours agoIf 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 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!