cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right 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: 

Trying to Move Files Between Folders with API

Trying to Move Files Between Folders with API

unshiftmedia
New member | Level 2
Go to solution

I'm trying to move files between folders using the HTTP API. I used this endpoint to get all of the files inside a specific folder: https://api.dropboxapi.com/2/files/list_folder. It returns this response as expected:

{
    "entries": [
        {
            ".tag": "file",
            "name": "ui-debug.log",
            "path_lower": "/apps/articles/new/ui-debug.log",
            "path_display": "/Apps/Articles/New/ui-debug.log",
            "id": "redacted",
            "client_modified": "2020-09-23T19:06:36Z",
            "server_modified": "2020-09-23T19:18:02Z",
            "rev": "redacted",
            "size": 50,
            "is_downloadable": true,
            "has_explicit_shared_members": true,
            "content_hash": "redacted"
        }
    ],
    "cursor": "redacted",
    "has_more": false
}
 
Then I go to move the file to the new folder and using this endpoint: https://api.dropboxapi.com/2/files/move_v2. I pass all the same authorization data and pass this as the body:
{
    "from_path": "/apps/articles/new/ui-debug.log",
    "to_path": "/apps/articles/archived",
    "allow_shared_folder": true,
    "autorename": true,
    "allow_ownership_transfer": true
}
 
This is the response I get:
 
{
    "error_summary": "from_lookup/not_found/.",
    "error": {
        ".tag": "from_lookup",
        "from_lookup": {
            ".tag": "not_found"
        }
    }
}
Am I missing something here? I'm passing the exact path I get when I list the files. Please advise.
1 Accepted Solution

Accepted Solutions

unshiftmedia
New member | Level 2
Go to solution

I figured it out, I was using the wrong header.

View solution in original post

1 Reply 1

unshiftmedia
New member | Level 2
Go to solution

I figured it out, I was using the wrong header.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    unshiftmedia New member | Level 2
What do Dropbox user levels mean?