cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Musicians, convert your MuseScore files to PDF to play music on the go! Learn more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: How can I retrieve a list of all the members who have been granted access to a file in team fold

How can I retrieve a list of all the members who have been granted access to a file in team folder

athithan
Helpful | Level 5

A member of a team has created a folder in the team folder, inside the folder there is a file. This file is shared with multiple users, excluding the admin. With admin privilege, I am able to retrieve the list of members of the file using the Dropbox API endpoint "https://api.dropboxapi.com/2/sharing/list_file_members".   The API provides me with a cursor for pagination. However, when I attempt to retrieve the next page of members using the endpoint "https://api.dropboxapi.com/2/sharing/list_file_members/continue", 

I encounter the following error:

Screenshot 2023-04-24 at 2.26.54 PM.png

 

I believe that this endpoint is supposed to support admin privileges, but it seems to be returning an error related to an invalid file ID. I am unsure how to retrieve the members on the next page if this endpoint does not support admin privileges. Can anyone provide guidance on how to resolve this issue?

 

13 Replies 13

Здравко
Legendary | Level 20

Hi @athithan,

Did you try to authenticate on continue as a regular user after authenticate as admin during start listing members instead of always as admin? 🤔

Greg-DB
Dropbox Staff

@athithan To echo what Здравко said, how did you make these two calls? It may be helpful if you can share the request for each of them so we can take a look. Be sure to redact the access token though. You can open an API ticket here if you'd prefer to share privately.

athithan
Helpful | Level 5

@gerg-DB

1. First I tried to list all the members as admin (page limit set to = 1)

List_all_file_members_-_____—_elba-projects.png

 2. Then the I used the cursor to  list the rest of the members wit same privilege, 

List_all_file_members_-_____—_elba-projects.png

 3. Then I tried to use the admin as a user,  received an error because, the file is not shared with admin

List_all_file_members_-_____—_elba-projects.png

Здравко
Legendary | Level 20

Try skip/jump over the second step.

athithan
Helpful | Level 5

 Thank you for your answers, but I couldn't catch you Could you  please elaborate  a bit more  

Здравко
Legendary | Level 20

@athithan, As you can see, /2/sharing/list_file_members/continue only support User authentication! That's it.

athithan
Helpful | Level 5

Is there any way to achieve what I want?

Greg-DB
Dropbox Staff

@athithan Thanks for the additional information. I'll ask the team to support "Dropbox-API-Select-Admin" on /2/sharing/list_file_members/continue, but I can't promise if or when that might be done though.

 

Instead, you'd need to use "Dropbox-API-Select-User", but make sure you're providing the member ID of an account that does have access to the specified file.

athithan
Helpful | Level 5

In my scenario, the admin needs to retrieve all the team folders and files, including shared members of the files and folders. Therefore, I am making multiple requests in a loop. However, if a folder is not shared with the admin, it will throw an error when trying to get the next page members (/continue). At this point, it is difficult to switch back to 'Dropbox-API-Select-User' because the admin is the owner of all content in the team folder, and I do not know the original owner of the folder. In my opinion, the /continue endpoint should support fetching the next page members in this case. I am looking forward to seeing your response. 🙏

Need more support?