Hello,
I want to get the file sharing information (such as how is it shared, if by link or who can view the file etc.)
so I'm using sharing_get_file_metadata with the admin team member id and the file id, but I get an access error:
GetFileMetadataError('access_error', SharingFileAccessError('invalid_file', None)
Even though the file is valid with files_get_metadata api (and the same file id)
This is the code:
dbx_t_as_admin = dbx_t.as_admin(<team_member_admin>)
namespaces_list_obj = dbx_t.team_namespaces_list()
for namespace_meta in namespaces_list_obj.namespaces:
ns = namespace_meta.namespace_id
files_meta = dbx_t_as_admin.files_list_folder(include_has_explicit_shared_members=True, path='ns:' + ns, recursive=True)
for file_meta in files_meta.entries:
type_ = str(type(file_meta))
if type_ == "<class 'dropbox.files.FileMetadata'>":
share_file_info = dbx_t_as_admin.sharing_get_file_metadata(file=file_meta.id)
The files are shared in the dropbox account.
Relevant information on one file_meta for example:
file_meta:
has_explicit_shared_members=True
parent_shared_folder_id=None
sharing_info=None
So why am I getting this error, the file is there and shared.
Another question:
Should I use a different api to retrieve that information?
btw the member id is the same member that has the file, he is also happened to be the admin.
Thank you in advance!
@Greg-DB