cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

Error 409 with download_zip on shared link subfolders

Error 409 with download_zip on shared link subfolders

gcx
New member | Level 2
Go to solution

I am receiving HTTP error 409 when using https://content.dropboxapi.com/2/files/download_zip.

I am using the folderIDs gathered from files_list_folder, based on a shared link.

The below is how I am forming my POST (in Python):

def download_zip(folder_id):
    url     = 'https://content.dropboxapi.com/2/files/download_zip'
    
    headers = {
        'Authorization': 'Bearer ' + token,
        'Dropbox-API-Arg': "{" + '''"path"''' + ":"  + '''"''' + folder_id   + '''"''' + "}"
    }

    res = requests.post(url, headers=headers)
    print(res)

A sample of a given header: 

{'Authorization': 'Bearer <MyKey>', 'Dropbox-API-Arg': '{"path":"id:DH1fqZncI8AAAAAAAAPgQA"}'}

Any help on how I can get the zip download to work on shared links would be appreciated. Thank you!

 

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

First, for reference, whenever you get an error from the Dropbox API, be sure to print out the response body as it may contain a more useful error message.

Anyway, unfortunately, the Dropbox API does not currently support getting a zip download of a subfolder based on the id of the subfolder returned from listing the shared link like this (unless the connected account happens to contain the folder anyway). I'll pass this along as a feature request, but I can't promise if or when that might be implemented. 

Note that you can download the top-level folder as a zip from the shared link as documented here, but that doesn't provide a mechanism for downloading a specific subfolder.

View solution in original post

2 Replies 2

Greg-DB
Dropbox Staff
Go to solution

First, for reference, whenever you get an error from the Dropbox API, be sure to print out the response body as it may contain a more useful error message.

Anyway, unfortunately, the Dropbox API does not currently support getting a zip download of a subfolder based on the id of the subfolder returned from listing the shared link like this (unless the connected account happens to contain the folder anyway). I'll pass this along as a feature request, but I can't promise if or when that might be implemented. 

Note that you can download the top-level folder as a zip from the shared link as documented here, but that doesn't provide a mechanism for downloading a specific subfolder.

gcx
New member | Level 2
Go to solution

Many thanks for your reply Greg. 

I had attempted to print the err message body but didn't find any content for this case. 

I'm glad to know this is a feature limitation rather than a bug or user error. If you could indeed pass this along as a feature request I'd appreciate it.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    gcx New member | Level 2
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?