cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more 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: 

Create Folder on a shared space doesn't have a have shared folder Id

Create Folder on a shared space doesn't have a have shared folder Id

TwinBlade
Helpful | Level 5

Hey,

I am using the .NET SDK and I found something odd  that I wanted to share.

I am using CreateFolderV2Async to create a folder on the root namespace and then I would like to save its namespace id/shared folder id, but if I use it like this: 

var result = await dbc.Files.CreateFolderV2Async("name");

and then get the shared folder id from the result like this: 

result.Metadata.AsFolder.SharedFolderId;

It is null. I have to do a seperate request to get the ID.

Wondering if this is a design decision or just something unplanned.

1 Reply 1

Greg-DB
Dropbox Staff

This is the expected behavior. The CreateFolderV2Async method creates a standard folder (private by default, unless it happens to be created inside some other shared folder), not a shared folder.

If you intended to share an existing folder, or make a new shared folder, you should use ShareFolderAsync instead. 

Or, to get the shared folder ID of the shared folder above the newly created folder, if any, you should check the ParentSharedFolderId instead of SharedFolderId.

Need more support?
Who's talking

Top contributors to this post

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