cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We recently received a question asking for advice on how to set up a Dropbox account for an elderly family member. This prompted us to think about the different ways we can make Dropbox more accessible in general, learn about it and add your tips right over here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
1
Ask
2
Reply and help

Permission Exception Thrown When Moving/Deleting

Permission Exception Thrown When Moving/Deleting

noahhornak
New member | Level 2

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 1

Re: Permission Exception Thrown When Moving/Deleting

Greg-DB
Dropboxer

[Cross-linking for reference: https://stackoverflow.com/questions/53110650/dropbox-permission-exception-thrown-when-moving-deletin... ]

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.

Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?