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

Aupajo's avatar
Aupajo
New member | Level 2
8 years ago

Getting the team member ID for Dropbox Business API

Users authenticated via a Dropbox Business app must provide a member_id (by the Dropbox-Select-User header, for example) when making a User Endpoint request.

 

It's not clear how to fetch that member_id token. The best I can come up with is to go through `/members/list` until I can find an entry that matches the current user.

 

Is there a way of quickly finding the member_id of the authenticated user to send through for the Dropbox-Select-User header?

  • Which "authenticated user" do you mean, exactly? Note that Dropbox Business API apps are linked to the entire team, not a specific member, so for any given Dropbox Business API app linked to a team, there isn't exactly a specific member implied.

     

    If you mean the particular member that happened to authorize the app to connect to the team, you can look them up using /2/team/token/get_authenticated_admin. Note that this will vary by access token though, and isn't necessarilly the current end-user of your app. It also won't necessarilly be available for every access token.

     

    Alternatively, if you're looking for a particular member based on a known email address or external ID, you can look them up using /2/team/members/get_info.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    Which "authenticated user" do you mean, exactly? Note that Dropbox Business API apps are linked to the entire team, not a specific member, so for any given Dropbox Business API app linked to a team, there isn't exactly a specific member implied.

     

    If you mean the particular member that happened to authorize the app to connect to the team, you can look them up using /2/team/token/get_authenticated_admin. Note that this will vary by access token though, and isn't necessarilly the current end-user of your app. It also won't necessarilly be available for every access token.

     

    Alternatively, if you're looking for a particular member based on a known email address or external ID, you can look them up using /2/team/members/get_info.

    • Aupajo's avatar
      Aupajo
      New member | Level 2

      Perfect! Yes, I was looking for the authenticated admin's team member ID.