We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Vishnudev
5 years agoExplorer | Level 3
trying to get members of a shared folder programatically
Hi,
I am trying to get the list of members of a shared folder programatically, using the python SDK.
I tried
response = dbx.sharing_list_file_members('/shared_folder_name').
I am getting this error:
dropbox.exceptions.ApiError: ApiError('50c5851add824ae9a2f8616e5ae67510', ListFileMembersError('access_error', SharingFileAccessError('is_folder', None)))
What am I missing?
I tried this and it works:
response = dbx.files_list_folder('/shared_folder_name')
for file in response.entries:
print (file.name)
2 Replies
- Здравко5 years agoLegendary | Level 20
Vishnudev wrote:Hi,
I am trying to get the list of members of a shared folder programatically, using the python SDK.
I tried
response = dbx.sharing_list_file_members('/shared_folder_name').
I am getting this error:
dropbox.exceptions.ApiError: ApiError('50c5851add824ae9a2f8616e5ae67510', ListFileMembersError('access_error', SharingFileAccessError('is_folder', None)))
What am I missing?
...Hi Vishnudev,
You are trying to check "shared folder". Ok, but why are you using file specific call (list file members)? 🧐 Better get the "shared_folder_id" (using contained folder list or similar) and apply it on call for folder members. 😉
Hope this helps.
- Greg-DB5 years ago
Dropbox Community Moderator
The sharing_list_file_members method is for listing the members of a shared file, and doesn't support listing the members of a shared folder. Accordingly when you call it for a shared folder, it fails with 'access_error/is_folder' like this.
To list the members of a shared folder, you should instead use sharing_list_folder_members and sharing_list_folder_members_continue.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!