Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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.
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.
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!