(You mentioned both "db.dat" and "db.dta" in your question. Print("File data: %s bytes" % len(res.content)) Res = dbx.sharing_get_shared_link_file(url=folder_shared_link, path=file_relative_path) Using that would look like this: import dropbox Based on the error output you shared, it looks like you are already using that (though not in the particular code snippet you posted). In the Dropbox API v2 Python SDK, that's the sharing_get_shared_link_file method (or sharing_get_shared_link_file_to_file). If you have the shared link to the parent folder and not the specific file you want, you can use the /2/sharing/get_shared_link_file endpoint to download just the specific file. Įrror given: : ApiError('22eaf5ee05614d2d9726b948f59a9ec7', GetSharedLinkFileError('shared_link_access_denied', None)) The thing is, I dont have the share link of this particular file in this shared folder, so if I use the url of the file preview, I get an error of denied access (even if I change dl=0 to 1). It actually download shares links of files if I modify the dl=0 to 1, like this: If total_length is None: # no content length headerįor data in er_content(chunk_size=4096): Response = requests.get(url, stream=True) So, I have this script: def download_file(url, filename):
I just want to donwload an specific file, called "db.dta". As the title says, I have access to a shared folder where some files are uploaded.