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: 

Long term expiration Token

Long term expiration Token

production_tvox
New member | Level 2
Go to solution

Hi,

 

I've created a new app but i'm not able to have a long term expiration token (token that never expires).
I've noticed that by default, since september 2021 i guess, all the new apps will have by default the short term expiration token (it expire each 4 hours) but i need the long term cause i'd like to avoid Oauth2 implementation.

I've sent an e-mail to the support with ticket number 16503714 and they marked it as 'solved' but when i click on 'generated access token' button (in settings/O auth2) it shows the 'sl.' token (same as before)

Could you help with that ?

Thanks!

1 Accepted Solution

Accepted Solutions

Здравко
Legendary | Level 20
Go to solution

Hi @production_tvox,

Long lived access tokens (despite existing can still be used) can NOT be issued any more. You should add in your code support for refresh token. Like the long lived access token, refresh token doesn't expire till revoke explicitly. If you are using in your application one of Dropbox SDKs, the only thing you have to do is initialization of client object properly with refresh token instead of long lived access token. The SDK in use will take care for the rest. Without SDK you have to add some refresh logic in your application, so to ensure a valid short lived access token is available whenever need.

You can avoid implementing full OAuth flow within your application with a pre-generated refresh token to be used into application (the same like long lived access token). 😉 Usable on server side applications. Take a look here for a possible way of getting such token.

Hope this helps.

View solution in original post

3 Replies 3

Здравко
Legendary | Level 20
Go to solution

Hi @production_tvox,

Long lived access tokens (despite existing can still be used) can NOT be issued any more. You should add in your code support for refresh token. Like the long lived access token, refresh token doesn't expire till revoke explicitly. If you are using in your application one of Dropbox SDKs, the only thing you have to do is initialization of client object properly with refresh token instead of long lived access token. The SDK in use will take care for the rest. Without SDK you have to add some refresh logic in your application, so to ensure a valid short lived access token is available whenever need.

You can avoid implementing full OAuth flow within your application with a pre-generated refresh token to be used into application (the same like long lived access token). 😉 Usable on server side applications. Take a look here for a possible way of getting such token.

Hope this helps.

Greg-DB
Dropbox Staff
Go to solution

@production_tvox  Здравко is correct; retrieving new long-lived access tokens is no longer an option. Refer to their message and the thread they linked to for more information.

 

By the way, I just checked and I see that your support ticket #16503714 did get a response with information about this. If you did not receive that, please check your email account's spam folder.

production_tvox
New member | Level 2
Go to solution

Thanks a lot for your explanation Здравко!

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    production_tvox New member | Level 2
  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Здравко Legendary | Level 20
What do Dropbox user levels mean?