cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know all about tools for creatives that work seamlessly with Dropbox, like Adobe? Well, check it out right here!

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dropbox API .NET SDK Invite team to team folder

Dropbox API .NET SDK Invite team to team folder

BIMcollab
Helpful | Level 5

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 Dropbox account with the old team space and members configuration the folders that get created are private.

I am using TeamFolderCreateAsync() to create the team folder, but I can't seem to find a way to give access for the TeamFolder to the team. I have tried using AddFolderMember with the teamId, but I am getting an error saying that the dropboxId is invalid.

So my question is, is there a way to give access to a newly created team folder to an entire team? Also, will TeamFolderCreateAsync() work with newer Dropbox accounts that use the new team space and member configuration? 

Any help is appreciated greatly!

1 Accepted Solution

Accepted Solutions

Re: Dropbox API .NET SDK Invite team to team folder

Greg-DB
Dropboxer

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.

View solution in original post

3 Replies 3

Re: Dropbox API .NET SDK Invite team to team folder

Greg-DB
Dropboxer

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.

View solution in original post

Re: Dropbox API .NET SDK Invite team to team folder

BIMcollab
Helpful | 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?

Re: Dropbox API .NET SDK Invite team to team folder

Greg-DB
Dropboxer

Yes, 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.

Poll
Do you work or study in the creative industry? If so, which area?
If you use Adobe, don't forget to check out our latest integrations update here.
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
  • User avatar
    BIMcollab Helpful | Level 5
What do Dropbox user levels mean?
Need more support?