Discuss Dropbox Developer & API
After reading the documentation here to rename an item, I'm not sure why I am getting a “not found” (409).
Here is the data of the item provided by https://api.dropboxapi.com/2/files/list_folder
Screenshot of the list_folder API response
Interesting that “id:” is prefixed in the string. As expected, I do get a 400 response because it does not match '[-_0-9a-zA-Z]+'
Going back to the requirements detailed in the docs, I took “id:” out to become “a_nxjuJ9zcUAAAAAAAAACQ”.
Screenshot of the request
I get back this 409 response.
I also tried removing “id:a” to “_nxjuJ9zcUAAAAAAAAACQ”, and when that didn't work, I removed “id:a_” and it still responded it couldn't be found. I thought perhaps because it's a folder, that's why, but even a PNG file could not be found/renamed either.
The /2/file_requests/update endpoint is for updating "file requests", not actual files/folders.
To rename a file or folder, you should use /2/files/move_v2. When supplying the "id" of a file or folder, supply it exactly as given. That is, do not remove the "id:" prefix or otherwise modify the value. To rename a folder, you would pass in the "id" as the "from_path" parameter, and the new path/name as the "to_path" parameter.
The /2/file_requests/update endpoint is for updating "file requests", not actual files/folders.
To rename a file or folder, you should use /2/files/move_v2. When supplying the "id" of a file or folder, supply it exactly as given. That is, do not remove the "id:" prefix or otherwise modify the value. To rename a folder, you would pass in the "id" as the "from_path" parameter, and the new path/name as the "to_path" parameter.
Thank you! Confirmed this works.
Screenshot of response (200)
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!