cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We are making some updates so the Community might be down for a few hours on Monday the 11th of November. Apologies for the inconvenience and thank you for your patience. You can find out more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

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

We need Long-live access token

We need Long-live access token

msmoe
Helpful | Level 5
Go to solution

Please Help ...

In the figure of no display long-live token tab in my dropbox app settings .

Why ? 

Please ...Help Me

 

dropbox1.JPG

We Need long-live token.

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

@msmoe Здравко is correct, Dropbox is no longer offering the option for creating new long-lived access tokens. Dropbox is 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.

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 released it gradually, so you may not have seen your app(s) affected until more recently. 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 this is something that would need to be implemented by the programmer of the app though, so if you are not the programmer responsible for this integration, you may need to get an update from them to support this.

View solution in original post

19 Replies 19

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

@msmoe wrote:

...

We Need long-live token.


Hi @msmoe,

The only long-lived token is refresh token. Time ago was possible to get long-lived access token, but it's obsolete and dropped already (in spite an existing can still be used, but new can't be issued anymore). Access token can be "refreshed" (i.e. ensuring valid) using refresh token.

Hope this clarifies matter.

Greg-DB
Dropbox Staff
Go to solution

@msmoe Здравко is correct, Dropbox is no longer offering the option for creating new long-lived access tokens. Dropbox is 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.

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 released it gradually, so you may not have seen your app(s) affected until more recently. 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 this is something that would need to be implemented by the programmer of the app though, so if you are not the programmer responsible for this integration, you may need to get an update from them to support this.

msmoe
Helpful | Level 5
Go to solution

Thank So much Sir.

But How to create refresh token .

I read http documentation, but I no understand.

I am junior php Laravel developer Sir.

please help me example tutorial or codes .

please .

 

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

Hi @msmoe,

As a example you can take a look here. It's not a PHP code, but a command line curl execution. I believe you haven't problem to convert it. The most important is HOW it's gonna work (as idea).

Have a nice day.

msmoe
Helpful | Level 5
Go to solution

Hi @Здравко ,

Thant You so much sir. I got it 

dropbox_token1.JPG

But include expires. Why?

And access token is Do you have to take it every time you request it?

Can't you take it once and use it all the time?

Please explain Sir.

msmoe
Helpful | Level 5
Go to solution

Hi @Здравко 

I don't understand  this step.

 

accesscode1.jpg

accesscode2.jpg

We developed mobile app now. So How to do this step?

I don't understand.

Please explain Sir Please.

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

Hi again @msmoe,

As I have mentioned in referred thread, you need to do refresh every time you need to use access token and previous one already expired! Access token does always expire (no more long lived access token), as mentioned too,  so don't ask why. You can't take it once, but whenever needed. You can calculate expiration moment as sum of current moment in seconds plus the value in "expires_in" and keep it. Every time you need access token a comparison can be performed and if current moment is NOT before the kept expiration moment, refresh should follows before you continue further since the token is already expired. That's it.

To be honest I'm not sure what actually you can't understand about your mobile application. By the way, you can use some of Dropbox SDKs to do this. Select one of available SDKs based on target platform and used development tools. Many things there are pre-built and ready to use. Use the examples available for every SDK as something like template to start. 😉

Good luck.

msmoe
Helpful | Level 5
Go to solution

Hi @Здравко 

Thank You So much Sir. I got access token using refresh token. My http request header's adding refresh-token. And return response access-token. Me used that access-token. And The request file is returned. It's okay, sir.

Is the above method correct? Sir.

But the response (.mp4) file is 0kb. I can't open it. Why?

Please explain Sir.

Thank

msmoe
Helpful | Level 5
Go to solution

Hi @Здравко 

 

Response Type is here !

 

rsp1.JPG

size is 0. why sir?

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Здравко Legendary | Level 20
  • User avatar
    msmoe Helpful | Level 5
What do Dropbox user levels mean?