Dropbox API Downloading a file Downloading a piece of a file via curl using Range Retrieval Requests

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

This downloads just a piece of a file, using Range Retrieval Requests, from the Dropbox API at the remote path /Homework/math/Prime_Numbers.txt to the local path Prime_Numbers.txt.partial in the current folder:

 curl -X GET https://content.dropboxapi.com/2/files/download \
     --header "Authorization: Bearer <ACCESS_TOKEN>" \
     --header "Dropbox-API-Arg: {\"path\": \"/Homework/math/Prime_Numbers.txt\"}" \
     --header "Range:bytes=0-10" \
     -o "./Prime_Numbers.txt.partial"

The range specified, 0-10, tells the API to return just the first 10 bytes. If the API responds with a 206 status code, that indicates that the Range was accepted, and only the partial request range was returned.

<ACCESS_TOKEN> should be replaced with your access token.



Got any Dropbox API Question?