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.
Not yet verified against the live vendor API: No Dropbox access token (DROPBOX_ACCESS_TOKEN, or DROPBOX_REFRESH_TOKEN + DROPBOX_APP_KEY + DROPBOX_APP_SECRET), so no authenticated read and no upload could run. Without a token Dropbox named the function for all 36 Bearer events (400 ‘Error in call to API function “<fn>”: Invalid authorization value’) while the same path + ‘_zz’ answered 404, all 36 Bearer events answered 401 invalid_access_token to a dummy token, and the token-less longpoll and oauth2/token calls were validated live (dummy cursor / bad client rejected with 400).
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:
-addRoute (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:

