Start 2025 on time and up to date. Seamlessly integrate your calendars into Dropbox with these simple steps.

Forum Discussion

amelesko's avatar
amelesko
Helpful | Level 5
4 months ago

API access with refresh_token in python

I have an app that I built in python and I'm trying to have sustained access to read from files in a folder   I've gone through the entire process of getting the user (myself) to sign in and get ...
  • amelesko's avatar
    amelesko
    4 months ago

    Well I solved this and was just being dumb. Sorry for any confusion

     

    It turns out that just proceeding with

    dbx = dropbox.Dropbox(oauth2_refresh_token=refresh_token, app_key=app_key, app_secret=app_secret)

    works as it should

     

    My mistake was saving the refresh_token to a DB and pulling it from there (I removed that step in my example code here to be more concise), and the DB was automatically removing a couple ending characters from the token