cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

CreateFolderV2 sharing_info shared_folder_id empty

Explorer | Level 4

Hi,

I am using the CreateFolderV2 to create a TeamFolder. The shared_folder_id in the sharing_info from the metadata is empty and I am not sure why. I also used the call to try to create folders in a Team folder and then in a shared folder, but with all of my attempts the shared_folder_id is always empty. I understand that in the documentation it says:

"shared_folder_id String(pattern="[-_0-9a-zA-Z+")? If this folder is a shared folder mount point, the ID of the shared folder mounted at this location. This field is optional."

However, I do not understand in which cases will the shared_folder_id actually be returned? 

1 Reply 1
Highlighted

Re: CreateFolderV2 sharing_info shared_folder_id empty

Dropboxer
Dropboxer

The /2/files/create_folder_v2 endpoint doesn't create team (or shared) folders. It just creates normal folders. Accordingly, the resulting folder won't have a shared folder ID, since it isn't a shared folder. Only team/shared folders themselves will have that set. It can be used to create normal folders in a variety of different contexts though, such as inside a team folder, team space, shared folder, or user's private folder. So, you can instead check 'sharing_info.parent_shared_folder_id' to see if a parent folder of it is shared.

If you want to create a team folder in a team that isn't using the team space configuration, and you're using a Dropbox Business API app with the "team member file access" permission, you can use the /2/team/team_folder/create endpoint. For teams using the team space configuration, you would just use the /2/files/create_folder_v2 endpoint to create a folder inside the team space.

Or, to just create a shared folder, you would use the /2/sharing/share_folder endpoint.

I recommend reading the Namespace Guide and Content Access Guide as they go over some of these concepts in more detail.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?