cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Do you have an idea for Dropbox Paper? Share it with us here!

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-Zslightly smiling face+")? 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

Re: CreateFolderV2 sharing_info shared_folder_id empty

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.

Reply
Loading...
API Support

Have a question? Our Dropbox Community is here to help you find an answer!
You won’t have to wait too long for a reply, but why not learn more about the Community while you’re here.

Not the right discussion for you? Find out what else our Community has to say about API Support.

Or, search our Help Center for even more.

Who's talking
Top contributors to this post