Dropbox OAuth

Professional Dropbox API integration with OAuth 2.0 and automatic token refresh

Overview

This node operation retrieves metadata information about a specific file or folder stored in Dropbox. It is useful when you need detailed attributes of a file or folder, such as its size, modification date, type, and other metadata without downloading the actual content.

Common scenarios include:

  • Checking file properties before processing or moving files.
  • Verifying if a file or folder exists and obtaining its details.
  • Automating workflows that depend on file metadata for decision-making.

For example, you might use this node to get metadata of a document to check its last modified time before triggering an update process.

Properties

Name Meaning
Path The full path of the file or folder in Dropbox whose metadata you want to retrieve. Example: /documents/report.pdf

Output

The output JSON contains the following structure:

  • resource: Always "file" indicating the resource type.
  • operation: Always "getMetadata" indicating the performed operation.
  • path: The input path of the file or folder.
  • metadata: An object containing detailed metadata returned by Dropbox API for the specified path. This includes attributes like file/folder name, id, client_modified timestamp, server_modified timestamp, size, and other relevant metadata fields depending on the item type.

Example output snippet:

{
  "resource": "file",
  "operation": "getMetadata",
  "path": "/path/to/file-or-folder",
  "metadata": {
    ".tag": "file",
    "name": "example.txt",
    "id": "id:a4ayc_80_OEAAAAAAAAAXw",
    "client_modified": "2020-09-15T15:53:00Z",
    "server_modified": "2020-09-15T15:53:00Z",
    "rev": "5c1a3e7",
    "size": 7212,
    "path_lower": "/path/to/example.txt",
    "path_display": "/path/to/example.txt",
    "sharing_info": {...},
    ...
  }
}

No binary data is output for this operation since it only fetches metadata.

Dependencies

  • Requires a valid OAuth 2.0 access token credential for Dropbox API authentication.
  • The node uses Dropbox API endpoints, specifically https://api.dropboxapi.com/2/files/get_metadata.
  • Network connectivity to Dropbox API is required.
  • No additional environment variables are needed beyond the configured OAuth credentials.

Troubleshooting

  • Invalid Path Error: If the specified path does not exist or is incorrect, the API will return an error. Verify the path string carefully, including case sensitivity and leading slashes.
  • Authentication Errors: If the OAuth token is expired or invalid, the node will attempt to refresh it via an OAuth handler URL. Ensure your OAuth credentials are correctly set up and the token refresh endpoint is accessible.
  • API Rate Limits: Frequent requests may hit Dropbox API rate limits. Implement retry logic or reduce request frequency if encountering rate limit errors.
  • Permission Denied: The authenticated user must have access rights to the file or folder. Check sharing permissions if access is denied.

Links and References

Discussion