We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
amfpaulo
4 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.
1 Reply
- Greg-DB4 years ago
Dropbox Community Moderator
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.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!