You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
JohnAdam_CUNY
9 months agoHelpful | Level 6
Get dbmid
I'm working on code that copies two files from our team admin. I was able to write all the copy reference code but now it wants me to have the member_Id but the only information I have is their email...
- 9 months ago
OK but I got a weird result type <class 'dropbox.team.MembersGetInfoV2Result'> I just want the dbmid or account_id. Is this a list?
Greg-DB
9 months agoDropbox Staff
You can get the team member ID (from the team_member_id field) for any particular member from a number of different ways using the API, generally anywhere that the API returns team member information.
For example, you can get the information about any particular team member, for instance by supplying their email address, by calling /2/team/members/get_info_v2. That's team_members_get_info_v2 in the Python SDK.
Or you can list all team members using /2/team/members/list_v2[/continue]. That's team_members_list_v2 and team_members_list_continue_v2 in the Python SDK.
Or you can get the new team member information when adding a new team member by calling /2/team/members/add_v2. That's team_members_add_v2 in the Python SDK.
Check out the documentation linked above to see the return types for information on how to access the 'team_member_id' field. (It may be in a nested field, so be sure to click through the types as needed.)
- JohnAdam_CUNY9 months agoHelpful | Level 6
OK but I got a weird result type <class 'dropbox.team.MembersGetInfoV2Result'> I just want the dbmid or account_id. Is this a list?
- Greg-DB9 months agoDropbox Staff
No, MembersGetInfoV2Result is not itself a list, but its members_info field is a list containing the respective result for each user selector you specified in the call.
For example:
MEMBER_EMAIL = "something@example.com" user_selector = dropbox.team.UserSelectorArg.email(MEMBER_EMAIL) users_to_query = [user_selector] # this can contain more than one result = dbx_team.team_members_get_info_v2(members=users_to_query) for info in result.members_info: if info.is_member_info(): print(info.get_member_info().profile.team_member_id) elif info.is_id_not_found(): print("User not found.") else: print("Other scenario.")
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,888 PostsLatest Activity: 9 hours agoIf 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 or Facebook.
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!