Skip to main content

Dropbox Component

Manage files stored in Dropbox

Component key: dropbox

Description#

Dropbox is a file sharing platform that allows teams to collaborate and share files with one another. The Dropbox component allows you to interact with the Dropbox API. You can upload, download, list, and move files within a Dropbox account.

A common integration pattern involves listing files in a file store, and performing a series of actions on the array of files that are returned. See our looping over files quickstart for information about how to create a loop over an array of files.

Authorization Methods#

Dropbox requires one of the following authorization methods:

Auth TypeKeyDescriptionFields
API Keyapi_keyAPI authorization based on an API key

API Key |  api_key

OAuth 2.0 - Authorization Codeoauth2OAuth 2.0 authorization using the authorization code grant type

Client ID |  client_id

Client Secret |  client_secret

Scopes |  scopes

Authorization URL |  auth_uri

Access Token URL |  token_uri

You can use an API key or OAuth 2.0 app to authenticate customers' Dropbox accounts. Information about generating Dropbox OAuth2 Tokens can be found on their developer documentation site. Further information about setting up an OAuth 2.0 credential for Dropbox can be found in our docs.

Actions#

Copy Object#

Copy a Folder or File from one path to another | key: copyObject

InputKeyNotesExample

From Path

string
/ Required
fromPathThe location of a source file within a Dropbox share. Include a leading /./path/to/source/file.txt

To Path

string
/ Required
toPathThe location of a destination file within a Dropbox share. Include a leading /./path/to/destination/file.txt

Output Example Payload#

{  "data": {    "metadata": {      ".tag": "file",      "name": "myCopy",      "id": "exampleId",      "client_modified": "Wed, 01 Jan 2020 00:00:00 GMT",      "server_modified": "Wed, 01 Jan 2020 00:00:00 GMT",      "size": 2048    }  }}

Create Folder#

Create a Folder at the specified path | key: createFolder

InputKeyNotesExample

Path

string
/ Required
pathThe location of a file within a Dropbox share. Include a leading /./path/to/file.txt

Output Example Payload#

{  "data": {    "metadata": {      "id": "exampleId",      "name": "myFolderName"    }  }}

Delete Object#

Delete a Folder or File at the specified path | key: deleteObject

InputKeyNotesExample

Path

string
/ Required
pathThe location of a file within a Dropbox share. Include a leading /./path/to/file.txt

Output Example Payload#

{  "data": {    "metadata": {      ".tag": "file",      "name": "myCopy",      "id": "exampleId",      "client_modified": "Wed, 01 Jan 2020 00:00:00 GMT",      "server_modified": "Wed, 01 Jan 2020 00:00:00 GMT",      "size": 2048    }  }}

Download File#

Download the file (< 150MB) at the specified path | key: downloadFile

InputKeyNotesExample

Path

string
/ Required
pathThe location of a file within a Dropbox share. Include a leading /./path/to/file.txt

Output Example Payload#

{  "data": {    "type": "Buffer",    "data": [      101,      120,      97,      109,      112,      108,      101    ]  },  "contentType": "application/octet"}

List Folder#

List Folder contents at the specified path | key: listFolder

InputKeyNotesExample

Directory Path

string
pathThe path to a directory within a Dropbox share. Include a leading /./path/to/my/directory/

Output Example Payload#

{  "data": [    {      "id": "exampleId",      "size": 2048,      "rev": "revision-1"    }  ]}

Move Object#

Move a Folder or File from one path to another | key: moveObject

InputKeyNotesExample

From Path

string
/ Required
fromPathThe location of a source file within a Dropbox share. Include a leading /./path/to/source/file.txt

To Path

string
/ Required
toPathThe location of a destination file within a Dropbox share. Include a leading /./path/to/destination/file.txt

Output Example Payload#

{  "data": {    "metadata": {      ".tag": "file",      "name": "myCopy",      "id": "exampleId",      "client_modified": "Wed, 01 Jan 2020 00:00:00 GMT",      "server_modified": "Wed, 01 Jan 2020 00:00:00 GMT",      "size": 2048    }  }}

Upload File#

Upload a file to the specified path | key: uploadFile

InputKeyNotesExample

File Contents

data
/ Required
fileContentsThe contents to write to a file. This can be a string of text, it can be binary data (like an image or PDF) that was generated in a previous step.My File Contents

Path

string
/ Required
pathThe location of a file within a Dropbox share. Include a leading /./path/to/file.txt

Output Example Payload#

{  "data": {    "id": "exampleId",    "client_modified": "Wed, 01 Jan 2020 00:00:00 GMT",    "server_modified": "Wed, 01 Jan 2020 00:00:00 GMT",    "size": 2048,    "name": "myFileName"  }}