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.

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: 

Dropbox access token keep revoke after some time

Dropbox access token keep revoke after some time

sauditracking
Explorer | Level 3

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

3 Replies 3

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:
If the Dropbox API isn't behaving as expected, feel free to contact support by opening an API ticket.

sauditracking
Explorer | 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.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    sauditracking Explorer | Level 3
What do Dropbox user levels mean?