We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
BIMcollab
7 years agoHelpful | Level 5
Dropbox API .NET SDK Invite team to team folder
Hi, I am developing an app with the .NET SDk, and up untill recently I have used create_folder_v2 to create folder on the root - thus creating a team folder. However, I noticed that on a Business...
- 7 years ago
It sounds like you already have the right idea here for the most part. If you're operating on a team with the old configuration (i.e., not using the "team space"), you need to explicitly create the team folder using TeamFolderCreateAsync and then add the team group using AddFolderMemberAsync.
I think the issue is that you're trying to use the team ID itself to add the team, instead of the group ID for everyone in the team. (The AddFolderMemberAsync method only takes group IDs.) Group IDs start with "g:". You can get the team's group ID from GroupsListAsync/GroupsListContinueAsync.
And for teams using the new team space configuration, you don't need to use TeamFolderCreateAsync or AddFolderMemberAsync at all. You would instead call CreateFolderAsync to make a folder inside the team space, by setting the "path root" to the team space using DropboxClient.WithPathRoot. There's more information on using the two different configurations in the Namespace Guide.
BIMcollab
7 years agoHelpful | Level 5
Hi Greg,
Thanks for the answer! I was wondering is there an API call with which you can distinguish whether the Dropbox account is using the old configuration or the new team space configuration?
Greg-DB
Dropbox Community Moderator
7 years agoYes, on the user side, you can use GetCurrentAccountAsync. You can use the returned FullAccount.RootInfo to distinguish this. RootInfo.IsTeam means the team uses the team space; RootInfo.IsUser means it doesn't.
Or on the team side, you can use FeaturesGetValuesAsync to get and check the FeatureValue.HasTeamSharedDropbox value.
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!