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.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,877 PostsLatest Activity: 12 months ago
326 Following

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!