POST /2/files/get_temporary_upload_link

get_temporary_upload_link

scope: files.content.write

Get a one-time use temporary upload link to upload a file to a Dropbox location.

This endpoint acts as a delayed upload. The returned temporary upload link may be used to make a POST request with the data to be uploaded. The upload will then be perfomed with the CommitInfo previously provided to get_temporary_upload_link but evaluated only upon consumption. Hence, errors stemming from invalid CommitInfo with respect to the state of the user's Dropbox will only be communicated at consumption time. Additionally, these errors are surfaced as generic HTTP 409 Conflict responses, potentially hiding issue details. The maximum temporary upload link duration is 4 hours. Upon consumption or expiration, a new link will have to be generated. Multiple links may exist for a specific upload path at any given time.

The POST request on the temporary upload link must have its Content-Type set to "application/octet-stream".

Example temporary upload link consumption request:

curl -X POST https://content.dropboxapi.com/apitul/1/bNi2uIYF51cVBND --header "Content-Type: application/octet-stream" --data-binary @local_file.txt

A successful temporary upload link consumption request returns the content hash of the uploaded data in JSON format.

Example succesful temporary upload link consumption response: {"content-hash": "599d71033d700ac892a0e48fa61b125d2f5994"}

An unsuccessful temporary upload link consumption request returns any of the following status codes:

HTTP 400 Bad Request: Content-Type is not one of application/octet-stream and text/plain or request is invalid. HTTP 409 Conflict: The temporary upload link does not exist or is currently unavailable, the upload failed, or another error happened. HTTP 410 Gone: The temporary upload link is expired or consumed.

Example unsuccessful temporary upload link consumption response: Temporary upload link has been recently consumed.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

dropbox-api-path-root String No
dropbox-api-select-user String No

Request body fields

Name Type Required Description
commit_info Object No
commit_info.autorename Boolean No
commit_info.mode String No
commit_info.mute Boolean No
commit_info.strict_conflict Boolean No
commit_info.path String No
duration Number No

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.