Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hi,
I am trying to copy a team folder to a new team folder but I am getting an error 'from_lookup/not_found/.'
Used id:.... format and path, no one works
c# api, code:
using (var dbx = new DropboxTeamClient(tokenMemberFile)) { var memListResult = await dbx.Team.MembersListAsync(); var memId = memListResult.Members.First(x => x.Profile.Email.Equals(adminEmail)) ?.Profile.TeamMemberId; var folders = await dbx.AsAdmin(memId).Files.ListFolderAsync(""); foreach (var entry in folders.Entries) { if (entry.Name.Equals(templateName) && entry.IsFolder) { template = entry.AsFolder; break; } } var copyRet = await dbx.AsAdmin(memId).Files .CopyV2Async(template.Id, "/new",true); <-- error
In order to process a copy in the member's folder like this, you should use AsMember instead of AsAdmin.
(For reference, this is because the /2/files/copy_v2 endpoint uses the "Team Admin" mode for "Dropbox-API-Select-Admin", meaning it can't access the member's private files.)
hello, with member works but I get this error 'to/conflict/folder/...
how can I indicate that I want to copy inside the folder ?
thanks
A 'to/conflict/folder' error indicates that the call failed because there's already a folder at the specified destination path.
If you're trying to a copy a folder to the inside of another folder, your destination path needs to include the desired name of the folder copy itself, in addition to any parent components, and not refer to a path that already exists.
For example, if you have a folder named "folder", and want to make a copy of it inside another pre-existing folder called "parent", your destination path should be "/parent/folder" (not just "/parent").
so if i need to copy the entire folder to other folder i must go folder by folder?
I'm not sure I understand your question. Are you referring to the folder's contents? If you copy a folder, it will copy the entirety of the folder's contents, including any subfolders.
yes, i want to copy one team folder to other team folder
When copying a folder, if it has subfolders inside it, you do not need to iterate over the subfolders. Copying a folder will copy the entire folder, including any contents, such as sub folders.
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!