I'm trying to download files inside a shared Dropbox Team Folder.
I have a list of shared folders in my account and I have the preview URLs saved for all the folders.
Using the preview URLs, I am able to recursively get a list of all files within the directory as follows:
link = dropbox.files.SharedLink(url=shared)
entries = dbx.files_list_folder(path="", shared_link=link).entries
This works great - it gives me the list of all the files and folders inside. I can recursively run the files_list_folder with the updated path including the entry name as well. However, the path_lower values for all entries are None.
Next, I need to be able to download the files to my local machine using the SDK.
I can use the following for files in my personal/user dropbox account:
dbx.files_download_to_file(tmp, entry.id)
But I'm not able to use that to download files in the shared directry.
Instead of entry.id, I tried {path/to/file} and {parent folder id}/{path/to/file} but those doesn't work either.
I also tried using sharing_get_shared_link_file but that returns:
dropbox.exceptions.ApiError: ApiError('489644ba039f4389a501a619df93a11a', GetSharedLinkFileError('shared_link_not_found', None))
Any help would be greatly appreciated!! Thank you so much!