We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

Ghislain Sommervogel's avatar
Ghislain Sommervogel
Helpful | Level 5
3 months ago

.NET API : How to copy files to HomeNamespaceId as an admin ?

Hi all,

I'm connected to a DropboxClient as an admin. I need to copy files from a team folder that my account isn't a member of to my HomeNamespaceId. For this, I'm using DropboxClient.Files.CopyV2Async. 

- the fromPath argument is filled with "ns:1234/copypath". Seems to work.

- the toPath is build this way : "ns:" + full.RootInfo.HomeNamespaceId + "/" + folderName

... where full  = DropboxClient.Users.GetCurrentAccountAsync() and folderName = a non-yet-existing directory that I want to create under my Home in order to share it later.

The call to DropboxClient.Files.CopyV2Async returns a "to/no_write_permission" error. Any idea of how I could solve this? As a workaround, I made my account a member of the team folder, so that I can connect "AsMember" and use CopyReferenceGetAsync, but that is not an ideal solution. Thanks for any advice.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    Unfortunately I don't believe there's an alternative in this scenario, because the /2/files/copy_v2 endpoint only supports the Dropbox-API-Select-Admin header in the "Team Admin" mode, meaning it has access to "team folders and team spaces but not the team members' home namespaces". So, when you administratively access contents the account doesn't have access to, you can't simultaneously access the user account's home folder.