We Want to Hear From You! What Do You Want to See on the Community? Tell us here!

Forum Discussion

noahhornak's avatar
noahhornak
New member | Level 2
7 years ago

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"}}

 

1 Reply

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,036 PostsLatest Activity: 3 days ago
412 Following

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 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!