I have a Python app that is intended to run as a scheduled job to save files to Dropbox at regular intervals. When I have a refresh token, this works fine:
dbx = dropbox.Dropbox(app_key='xxx', app_secret='yyy', oauth2_refresh_token='zzz')
But of course, the token only lasts for four hours. Every example I've found (here and here) all lead to answers that require a manual login to retrieve a refresh token. That will not help me to automate this job.
What can I do to get some sort of "long running" token or to be able to automatically generate refresh tokens without having to log in manually?