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
nitish166
3 years agoHelpful | Level 5
Need Permanant Access token for drop box
Hi All,
Good day...!!!
I'm Nitish Kumar from India. I'm a software engineer. Currently, I'm working on one of the projects using node js where I'm using dropbox API with the access token. ev...
- 3 years ago
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.
For reference, while the creation of new long-lived access tokens is now deprecated, we don't currently have a plan to disable existing long-lived access tokens. (If that changes, we will of course announce that ahead of time.) That being the case, you can continue using existing long-lived access token(s) without interruption, if you have any. Also, note though that after the change you won't be able to create new long-lived access tokens.
While the change began on September 30th 2021, 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.
Greg-DB
Dropbox Staff
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.
For reference, while the creation of new long-lived access tokens is now deprecated, we don't currently have a plan to disable existing long-lived access tokens. (If that changes, we will of course announce that ahead of time.) That being the case, you can continue using existing long-lived access token(s) without interruption, if you have any. Also, note though that after the change you won't be able to create new long-lived access tokens.
While the change began on September 30th 2021, 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.
nitish166
3 years agoHelpful | Level 5
Thanks for the reply.
Letting you know that the javascript code is working fine. also, able to generate the access token through the code. but still, we are facing the manual user intervention issue. whenever we are running the script and accessing through the localhost:3000 then, every time it is asking for user approval. below screenshot for the same.
Also, below screenshot for the access token. as per the screenshot, the token will get expired in after 4 hours.
So, team can you please help us to get the permanant access-token without user intervantion. thank you!
Thank and regards.
- Здравко3 years agoLegendary | Level 20
Hi nitish166,
The refresh token seen on your dump doesn't expire. Do you use it or the access token only?! 🤔😉
Hope this gives direction.
- nitish1663 years agoHelpful | Level 5
Thanks, Здравко
Please be notified that I'm using access_token only for communicating dropbox API with my node js code. I'm not able to figure out where should use the refresh token in my code. please find the below code for the same.
So, can you please help me for the same. it would be really appricated. thank you!
Thanks and regards,
Nitish Kumar
- Greg-DB3 years agoDropbox Staff
nitish166 It looks like you are not using the Dropbox API v2 JavaScript SDK. We highly recommend using an official SDK whenever possible, as it will do much of the work for you. For instance, you can find the Dropbox API v2 JavaScript SDK here, and an example of using refresh tokens with the JavaScript SDK here.
Otherwise, if you cannot use the SDK, you'll need to use the refresh token to programmatically retrieve new short-lived access tokens whenever needed. You can find more information on that in the OAuth Guide and authorization documentation. For instance, refer to "Example: refresh token request" in the /oauth2/token documentation.
About Discuss Dropbox Developer & API
Make connections with other developers
795 PostsLatest Activity: 9 days 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!