Learn how to make the most out of the Dropbox Community here 💙.
Forum Discussion
amfpaulo
3 years agoNew member | Level 2
Documentatation Links are broken! .NET SDK
Hey guys I am trying to do something that I thought it will be very easy, but the lack of documentation and confusing error messages is make this almost impossible for me, could be also my lack of knowledge. All suggestions links on this forum are giving me 404 error. Anyways, here is my problem:
I am using .NET SDK
PackageReference Include="Dropbox.Api" Version="6.36.0"
What I want to do is:
- Create a folder
- Share this folder with another dropbox account (not member of my team)
here is my code:
var folder = await dbx.Files.CreateFolderV2Async("/newfolder");
var folderId = dbx.Sharing.ShareFolderAsync(
new Dropbox.Api.Sharing.ShareFolderArg(
"/newfolder",
new Dropbox.Api.Sharing.AclUpdatePolicy().AsEditors,
false,
null,
null,
null,
null,
null, //new List<Dropbox.Api.Sharing.FolderAction> { new Dropbox.Api.Sharing.FolderAction().AsEditContents },
new Dropbox.Api.Sharing.LinkSettings(new Dropbox.Api.Sharing.AccessLevel().AsEditor
))).Result.AsComplete.Value.SharedFolderId;
await dbx.Sharing.AddFolderMemberAsync(
new Dropbox.Api.Sharing.AddFolderMemberArg(folderId, new List<Dropbox.Api.Sharing.AddMember>
{
new Dropbox.Api.Sharing.AddMember (new Dropbox.Api.Sharing.MemberSelector.Email("any@email.com") )
}));
If I use :
var folderId = dbx.Sharing.ShareFolderAsync(
new Dropbox.Api.Sharing.ShareFolderArg("/Course1234569") )
it worked, however the folder is ready only for the email I shared with.
I need the person I shared the folder with having Editor access (Can read and write)
Please Help.
- Greg-DB
Dropbox Staff
Apologies for the trouble with the documentation. You can find the latest documentation for the .NET SDK here.
For instance, here's the link for CreateFolderV2Async, for ShareFolderAsync, and for AddFolderMemberAsync.
If you want to add a member as an editor, you should set AccessLevel.Editor.Instance as the accessLevel in the AddMember.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,966 PostsLatest Activity: 2 days ago
If you need more help you can view your support options (expected response time for an email or 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!