Discuss Dropbox Developer & API
Hello guys,
Hope you all are doing great!.
I am implementing file upload dropbox for that i needed an access token. for that, i used generated token from the app but that short-lived token but I needed permanent access. I don't want auth flow because it's a personal account so the user will have to upload files only.
Kindly help me in this case.
Thanks
Do you mean permanent token for your own account? In that case you can create one at https://www.dropbox.com/developers/apps/create More details: https://dropbox.tech/developers/generate-an-access-token-for-your-own-account
I have followed the same process but that generated token is a short-lived token.
how can I extend this token with no expiration token? I want a permanent token because our users will upload files to my account from my website there is no need for Auth flow on my website.
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.
If your app needs to maintain long-term access without the user manually re-authorizing it repeatedly, the app should request "offline" access so that it gets a refresh token. The refresh token doesn't expire and can be stored and used repeatedly to get new short-lived access tokens whenever needed, without the user manually reauthorizing the app. If this is just for your own account, you will still need to process the OAuth app authorization flow (as refresh tokens are not available via the "Generate" button on the App Console), but you only need to do so once.
you can use this code to get long term access token
https://github.com/nhakhtn/dropbox-api-long-term-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!