Overview
Client-mode REST API connectors for Dropbox: upload shift reports, batch records and alarm snapshots from MQTT as files, download recipes and configs, watch folders for new files with a cursor and longpoll, search, copy, move to archive, restore revisions, save URLs, tag files, and share them with temporary links, shared links and file requests. This is one of the templates in the Dropbox REST API app (dropbox). Deploy it alongside the other connectors of that app when they depend on each other (for example a token connector plus an API connector). See Dropbox for the package overview.
Auth
- schemes: [“Authorization: Bearer {value.json.access_token} on every DropboxRestApi and DropboxContentRestApi event except OAuthTokenRefresh (OAuth 2.0 access token of a scoped Dropbox app; short-lived, expires_in 14400 s)”, “OAuthTokenRefresh: POST https://api.dropboxapi.com/oauth2/token, application/x-www-form-urlencoded {value.json.form} = grant_type=refresh_token&refresh_token=…&client_id=<app key>&client_secret=<app secret>, no Authorization header”, “FolderLongpoll (notify host): no Authorization header (Dropbox answers 400 ‘Your request includes an Authorization header, but this function does not use it.’)”]
- secrets: [“DROPBOX_ACCESS_TOKEN”, “DROPBOX_REFRESH_TOKEN”, “DROPBOX_APP_KEY”, “DROPBOX_APP_SECRET”]
- scopes: [“account_info.read”, “file_requests.read”, “file_requests.write”, “files.content.read”, “files.content.write”, “files.metadata.read”, “files.metadata.write”, “sharing.read”, “sharing.write”]
- note: Inject secrets with a LoT action (GET SECRET); never retain topics that carry the token, refresh token or app secret; restrict storage/dropbox/oauth/# with ACLs (the refresh response carries the new access token). Authorise once with token_access_type=offline to get a refresh token. App folder apps see only /Apps/<app>/.
Template parameters
BASE_ADDRESS default: https://notify.dropboxapi.com.
Events
Deploy
Get the template card (JSON withtemplate and metadata) from the broker, then deploy the connector:
BASE_ADDRESS already filled in:
-addConnector (do not include ADD METADATA).
Usage example
CallFolderLongpoll by publishing a JSON payload to its request topic, and read the reply on the response topic:

