cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know what we learned at IBC? Check out our learnings on media, remote working and more 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: 

CreateFolderV2 sharing_info shared_folder_id empty

CreateFolderV2 sharing_info shared_folder_id empty

BIMcollab
Helpful | Level 5

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

Greg-DB
Dropbox Staff

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.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?