Hi guys,
I'm currently integrating with Dropbox Business. I have Team credentials with "team_id"... And I don't want to work on behalf on specific user/admin. My main goal is actually to work with files (upload/download/rename/delete) that are in Team Folders - used and managed by different users/admins.
My dev business account is actually on Team Spaces, and I already know that I need to:
- call team/namespaces/list - to get shared folders namespace ID
- use Dropbox-API-Path-Root header to identity on which Team Folder root I want to work on
But additionally to work with files - I need to use User Endpoints - which requires me to use Dropbox-API-Select-Admin. I already know that I can call "team/members/list_v2" - and pick an admin account to be used on behalf with user endpoints. And this is where my doubts start.
1. I could leave it dynamic - and before any call to User Endpoints - I can always call "team/members/list_v2" - and just get first admin. I don't have to worry about storing/checking admin "member_id" - but I don't like to duplicate the amount of calls to API - before making a call to user endpoints I have to make another call to get admin member id.
2. I could make a call once - and store/cache the admin member id - to reuse it in following calls. But in this case what would be best expiation timestamp to look for admin again - whatever it will be - what if cached admin account is downgraded to user or just leave the company... etc.. No matter if I re-check admin once per week, day or hour... In between the selected admin account might no longer be admin.
3. I can make it fixed - and just use 1'st admin, and if admin changes/leaves company - I will tell my customers that they need to refresh integration and pick another admin... I guess dummiest solution, since I can call "team/members/list_v2" myself - and this can be automated... Just writting it down, but definitelly not sth to use.
In my opinion the best option would be to use sth like "Dropbox-API-Select-Admin: Default" - but it doesn't exists.
What is the best or recommended approach in this situation?