cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Discuss Dropbox Developer & API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Permanent Access token

Permanent Access token

EIS
Explorer | Level 3

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 

4 Replies 4

Elixir
Super User

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 

EIS
Explorer | Level 3

I have followed the same process but that generated token is a short-lived token.   token.PNG

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.

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.

 

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.

nhakhtn
New member | Level 2

you can use this code to get long term access token

https://github.com/nhakhtn/dropbox-api-long-term-refresh-token

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    nhakhtn New member | Level 2
  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    EIS Explorer | Level 3
  • User avatar
    Elixir Super User
What do Dropbox user levels mean?