cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know what we learned at IBC? Check out our learnings on media, remote working and more right 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: 

How to determine admin user to be used in select_admin for team folders?

How to determine admin user to be used in select_admin for team folders?

maverick1985
Explorer | Level 3

I am using below api to get the list of all users. How to determine the admin from these users
I need to use his/her id for select_admin: in subsequent calls for listing team folders

const headers = {
Authorization: `Bearer ${accessToken}`,
'Content-Type': 'application/json',
};
1 Reply 1

DB-Des
Dropbox Engineer

Hi @maverick1985,

 

In the response object from the request sent to /team/members/list_v2[continue] endpoint, you should check if the roles property is present. The information contained in this property provides the role_id, the type of admin role the user has (under name), and a short description of the role.

 

As such:

 

"roles": [
        {
          "role_id": "pid_dbtmr:AAAAAFMcx6E0tax39",
          "name": "Team",
          "description": "Manage everything and access all permissions"
        }
]

 

 

Additionally, a request to /team/members/get_available_team_member_roles provides the available team roles for the connected team, along with each role's respective role_id â€” for roles defined by Dropbox, this ID is the same across all teams.

 

This information could then be used to filter through the list of returned users.

 

I hope you find this information helpful!

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    DB-Des Dropbox Engineer
What do Dropbox user levels mean?