Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

pp111's avatar
pp111
Explorer | Level 4
4 months ago
Solved

Large files download fails after 1 hour

Hello, I am downloading files with the Dropbox API correctly using "https://content.dropboxapi.com/2/files/download" However, when the file download takes longer than 1 hour (exactly), the Dropbox ...
  • iNeil's avatar
    4 months ago

    Hi pp111​

    Thank you for providing this information. 

    The connections for these Dropbox API download calls are limited to one hour. 

    If you need to perform downloads over longer periods (i.e., more than an hour), please issue multiple download requests, each lasting no longer than an hour, to retrieve a portion of the file per request. You can then reassemble the file afterward.

    To support downloading large files in parts, the API supports Range Retrieval Requests, which allow files to be downloaded in segments. Here’s a sample curl command for reference:

    curl -X POST https://content.dropboxapi.com/2/files/download \ 
    --header "Authorization: Bearer ACCESS_TOKEN" \ 
    --header "Dropbox-API-Arg: {\"path\": \"/test.txt\"}" \ 
    --header "Range:bytes=0-2"

    The above curl command will download only the first three bytes of the file at /test.txt. You can adjust the byte range to download any portion of the file, such as when continuing with the next portion.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

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, Facebook or Instagram.

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!