Start 2025 on time and up to date. Seamlessly integrate your calendars into Dropbox with these simple steps.
Forum Discussion
noahhornak
7 years agoNew member | Level 2
Permission Exception Thrown When Moving/Deleting
I am trying to move a file from within a Shared Dropbox Folder using the Business API. I am attempting to do this through a 'DropBoxClient' instance. I first create a 'DropBoxTeamClient' using the access token specific to my dropbox application and then I impersonate a user that has Team Admin access and convert the 'DropBoxTeamClient' to a 'DropBoxClient' in order to gain access to the methods used to work with the files:
var client = teamClient.AsAdmin(userToImpersonate.Profile.TeamMemberId);
From there I have the ability to get and download file data and meta data. But when I need to move a file:
client.Files.MoveV2Async(file.Response.PathDisplay, toPath, true, true, true).Wait();
I get a 'Dropbox.Api.PathRootException' with a message of 'no_permission/...' . The client I'm using has Team Admin access and when I grab the metadata for both the folder I'm moving from/to as well as the file I'm trying to move, 'ReadOnly' is false, but the behavior suggests that I only have readonly access despite the value being false and the client having that level of access. I tried impersonating the owner of the shared folder and got the same result. I am able to move and delete through the dropbox UI but not throught the API. Is there some step/parameter that I am missing in the request? Here is the captured request body:
{"from_path":"/Test/Products/Import/TestZIP.zip","to_path":"/Test/Products/Import/TestZIP.zip","allow_shared_folder":true,"autorename":true,"allow_ownership_transfer":true}
And Response is a status of 244:
{"error_summary": "no_permission/", "error": {".tag": "no_permission"}}
- Greg-DBDropbox Staff
[Cross-linking for reference: https://stackoverflow.com/questions/53110650/dropbox-permission-exception-thrown-when-moving-deleting ]
Is that the actual request body, or did you modify it when posting it here? You seem to have the same value in both the "from_path" and "to_path" parameters, which should produce a different error.
Anyway, I think the issue may be that you need to use AsMember for this use case, instead of AsAdmin.
Please give that a try. If that doesn't help, please open an API ticket with the team member ID and the parameter values so we can look into this for you.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,921 PostsLatest Activity: 3 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!