As a real newbye in python I'm trying to download a single file from my dropbox account.
I've got the Dropbox token and written such a function:
def download_file():
dbx = dropbox.Dropbox(DROPBOXTOKEN)
# Check that the access token is valid
try:
dbx.users_get_current_account()
except AuthError as err:
sys.exit("ERROR: Invalid access token; try re-generating an access token from the app console on the web.")
with open("//", "w") as f:
metadata, res = dbx.files_download(path=DROPPATH)
f.write(res.content)
As far as I can understand, the only data I need are DROPBOXTOKEN (i've got) and DROPPATH (the full pathh to the file in Dropbox space. Is it true? How can I get the DROPPATH ? Can I get it accessing my web Dropbox account (if not, how can I do?)