ArnabXD / Dropbox-Index

A simple public dropbox index
https://dropx.arnabxd.me
Apache License 2.0
32 stars 34 forks source link

Dropbox "No Expiration Token" #103

Closed newd2459 closed 2 years ago

newd2459 commented 2 years ago

hi , pls try again i talked to dropbox support today and they just replied that long -lived tokens are not available anymore, from sept 2021 they have started the update and only short lived tokens will be given , to automate the process of obtaining new token we can get a refresh token and using api we can get new short lived token. These are the links they provided - https://dropbox.tech/developers/migrating-app-permissions-and-access-tokens#updating-access-token-type https://www.dropbox.com/developers/documentation/http/documentation#authorization https://developers.dropbox.com/oauth-guide

newd2459 commented 2 years ago

These are the exact words of support -- 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.

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.

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.

ArnabXD commented 2 years ago

Thank you very much for your investigation. I wasn't aware of this as my token was working fine and no one made a detailed issue. I will try to update DropBox-Index in the upcoming weekend.

newd2459 commented 2 years ago

currently i am using this to get new sl tokens https://stackoverflow.com/questions/70641660/how-do-you-get-and-use-a-refresh-token-for-the-dropbox-api-python-3-x maybe this will help a little

ArnabXD commented 2 years ago

I have implemented the refresh token generation. I will be writing proper documentation but before that, I would like you to test this out.

Now .env.local file has requirement changes. You can clone the repository again or simply run git pull inside the previously cloned directory to update. You can check the .env.sample file as an example

Now your site should be working.

Additionally, disallow public clients (optional).

image

pandamoon21 commented 1 year ago

currently i am using this to get new sl tokens https://stackoverflow.com/questions/70641660/how-do-you-get-and-use-a-refresh-token-for-the-dropbox-api-python-3-x maybe this will help a little

This support page is helpful too if anyone need it https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Get-refresh-token-from-access-token/td-p/596739