One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
sauditracking
6 years agoExplorer | Level 3
Dropbox access token keep revoke after some time
I have a personal account on dropbox for saving some data automatically through python script, the account working smoothly with the script except one issue, the access token keep changing every 2 days or like that (my script working daily automatically), because of this issue I have to every some time generate new access token and replace it with the one in script still I didn't find any reason for ,
I have the following python script to deal with dropbox :
access_token = 'bMDDDDggkS5jzV1_diCIGK6bZCzUp'
file_from = file_path
file_to = to_path
dbx = dropbox.Dropbox(access_token)
f = open(file_from, 'rb')
dbx.files_upload(f.read(), file_to)
as I said the script working fine, but how could I keep the access token without revoke ?
BTW I know the access token not get expired, why this happen ?
steps I did :
- create an app folder and make limited access for script
- only 1 user access to the dropbox account
- user linked
- Greg-DB
Dropbox Staff
[Cross-linking for reference: https://stackoverflow.com/questions/58909301/dropbox-access-token-keep-revoke-after-some-time ]
By default, Dropbox API access tokens for your app(s) don't expire by themselves, but there a number of different ways that a Dropbox API access token can become invalid, including:- the user or team admin can revoke all access tokens for an app by unlinking it on any of the following Dropbox web pages:
- the Connected apps page
- the Security checkup page
- the Team apps page on the Settings section of Business Admin console
- the team member’s page on the Members section of the Business Admin console
- any client with the access token can revoke the access token by calling /2/auth/token/revoke
- the Github-Dropbox token scanning partnership can revoke access tokens found publicly posted on GitHub
- if the app uses the "app folder" permission, the access token can effectively be disabled by deleting the app folder itself in the Dropbox account, via the Dropbox website or any client
- the app can be disabled
- the account that owns the app can be disabled
- the connected account can be disabled
If the Dropbox API isn't behaving as expected, feel free to contact support by opening an API ticket.- sauditrackingExplorer | Level 3
Thx for your good reply
as you mention the access token couldn't revoke by it self, and there are some reasons, here as i'm the admin & account owner & only user use the account I will reply with actions token before based on your mention :
the Connected apps page : connected
the Security checkup page : connected
any client with the access token can revoke : there is no clients , there is one user, it's me
can revoke access tokens found publicly posted on GitHub : it's not uploaded to github
if the app uses the "app folder" permission, the access token can effectively be disabled by deleting the app folder : app folder still exist
the app can be disabled : app still enabled
the account that owns the app can be disabled : account still enabled
the connected account can be disabled : connected account still enabled
as you mention the access token wouldn't expire , may you explan with the wrong thing I did ?BTW, I change the access token ysterday, it was working fine yesterday , today it's got revoked !
- Greg-DB
Dropbox Staff
I can't say offhand what may have happened, but if the API isn't working for you, please feel free to open an API ticket with details from the relevant account.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,945 PostsLatest Activity: 6 minutes ago
If you need more help you can view your support options (expected response time for an email or 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!