New Dropbox API endpoint: /save_url
The Dropbox Core API now includes a /save_url endpoint that lets developers upload files to Dropbox by supplying a URL, eliminating the need to download the file to a server first. This offers functionality similar to the Dropbox Saver, but without requiring any user interaction.
To call /save_url, you need an OAuth access token, just as with any other Core API endpoint. The OAuth guide covers the various methods for obtaining one.
With a token in hand, the request is straightforward. Here's an example using curl. Note that the destination path is embedded in the URL (/images/downloaded.png in this case), while the source file is passed via the url form parameter:
curl https://api.dropbox.com/1/save_url/auto/images/downloaded.png \
-d url="https://dl.dropboxusercontent.com/s/deroi5nwm6u7gdf/advice.png" \
-H "Authorization: Bearer <ACCESS TOKEN>"
The endpoint returns a JSON response containing a job ID:
{"status": "PENDING", "job": "PEiuxsfaISEAAAAAAADw7g"}
The job ID lets you poll for the status of an asynchronous save operation using the /save_url_job endpoint:
curl https://api.dropbox.com/1/save_url_job/PEiuxsfaISEAAAAAAADw7g \
-H "Authorization: Bearer <ACCESS TOKEN>"
Just like /save_url, a call to /save_url_job returns the current job status in its response:
{"status": "DOWNLOADING"}
When the save finishes without errors, the status field in the response dictionary is set to COMPLETE.
For complete details on both /save_url and /save_url_job, refer to the save URL API documentation.



