Need to see if your shared folder is taking up space on your dropbox šØāš»? Find out how to check here.
Forum Discussion
Simone11
7 years agoExplorer | Level 4
Dropbox for Business API Access token login process.
Hi There. I have an iOS apllication written in Objective-C. I have successfully integrated Dropbox API in my app and I can upload and download data from dropox even using the Access Token for it. ...
- 7 years ago
If you have a Dropbox Business API access token for an app with the "team member file access" permission and want to programmatically access a specific member's account using the Dropbox Objective-C SDK, you should use the DBTeamClient userClientWithMemberId: method. That will give you a DBUserClient you can use to access the user methods, such as listFolder. (It sets the "Dropbox-API-Select-User" header mentioned in the error message you shared.)
That would look like this:
DBTeamClient *teamClient = [[DBTeamClient alloc] initWithAccessToken:ACCESS_TOKEN]; DBUserClient *userClient = [teamClient userClientWithMemberId:memberID]; [[userClient.filesRoutes listFolder:path] setResponseBlock...
The member ID would be the team member ID (which starts with "dbmid:"). You can get those from membersList/membersListContinue, for instance.
Also, note that client-side applications, such as on iOS, can't keep secrets, such as access tokens, from a malicious user. For that reason, we don't recommend sharing/hard-coding access tokens in client-side applications. For example, in your described scenario, one team member could potentially extract the access token and use it to access another member's account.
Simone11
7 years agoExplorer | Level 4
Hi Greg-DB ,
So that means using Access token for business admins account and memberID I should be able to access that members folders/directory structure similar to how I do using personal normal access token with same methods(listfolders) correct? Also, I should be able to download and update data/files to these members folders I Specify in members account right?
Also one out of the context question. Is there a way Team Admin can hide/Make other team memebers not see who all are there in their Team? I just dont want other team member to see who are there in their team when they login to their DB account on web.
Greg-DB
Dropbox Community Moderator
7 years agoYes, whether you get a DBUserClient directly from an access token for a specific account, or from an access token for a Business team and then select the team member account as discussed above, the methods for interacting with an account (e.g., to list folders, etc.) are the same.
You can hide certain team members from the directory as covered in the help center here. Note that this won't remove those team members from the member list returned by the API itself, but you can have your app omit those members when using the API result based on TeamMemberProfile.isDirectoryRestricted
- Simone117 years agoExplorer | Level 4
Hi Greg-DB ,
Many Thanks for helping me out to understand the process. I have implemented your suggestions and it works as expected.
Regarding hiding team members yes, I followed the steps and the team members are hidden from the other team members.
The only issue is when the team member clicks on the file they can see 1st 3-4 team members list with profile picture and user name. As show in screenshot below top right corner. Is there any way to hide this also?
- Greg-DB7 years ago
Dropbox Community Moderator
I can only really help with the Dropbox API itself, so for Business/web site questions like this, please contact Business support.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If 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, Facebook or Instagram.
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!