Dropbox Business Events

Cloud Elements supports events via polling or webhooks depending on the API provider. For more information about our Events framework, see Events Overview.

Supported Events and Resources

Cloud Elements supports webhook events for Dropbox Business. After receiving an event, Cloud Elements standardizes the payload and sends an event to the configured callback URL of your authenticated element instance. For more information about webhooks at Dropbox including the currently available webhooks, see their webhooks documentation.

Configure Webhooks Through the UI

To configure webhooks through the UI, follow the same steps to authenticate an element instance, and then turn on events. For more information, see Authenticate an Element Instance with Events (UI) or the element-specific authentication topic.

Configure Webhooks Through API

To add webhooks when authenticating through the /instances API call, add the following to the configuration object in the JSON body. For more information about each parameter described here, see Parameters.

{
"event.notification.enabled": true,
"event.notification.callback.url": "<INSERT_YOUR_APPS_CALLBACK_URL>",
"event.notification.signature.key": "<INSERT_KEY>"
}
Note: event.notification.signature.key is optional.

Example JSON with Webhooks

Instance JSON with webhooks events enabled:

        {
          "element": {
            "key": "dropboxbusiness"
          },
          "providerData": {
            "code": "<AUTHORIZATION_GRANT_CODE>"
          },
          "configuration": {
            "oauth.api.key": "<CLIENT_ID>",
            "oauth.api.secret": "<CLIENT_SECRET>",
            "oauth.callback.url": "https://www.mycoolapp.com/auth",
            "event.notification.enabled": true,
            "event.notification.callback.url": "<INSERT_YOUR_APPS_CALLBACK_URL>",
            "event.notification.signature.key": "<INSERT_KEY>"
          },
          "tags": [
            "<ADD_YOUR_TAGS>"
          ],
          "name": "<INSTANCE_NAME>"
        }

Parameters

API parameters are in code formatting.

ParameterDescriptionData Type
keyThe element key.
dropbox
string
codeThe authorization grant code returned from the API provider in an OAuth2 authentication workflow.string
Name
name
The name for the element instance created during authentication.string
authentication.typeIdentifies how you are authenticating with Dropbox. Either oauth2 or apiKey.string
oauth.callback.urlOAuth 2.0 authentication only. The URL where you want to redirect users after they grant access. This is the Redirect URI that you noted in API Provider Setup.string
oauth.api.keyOAuth 2.0 authentication only. The Client ID from Dropbox. This is the App key that you noted in API Provider Setup.string
oauth.api.secretOAuth 2.0 authentication only. The Client Secret from Dropbox. This is the App secret that you noted in API Provider Setup.string
Events Enabled
event.notification.enabled
Optional. Identifies that events are enabled for the element instance.
Default: false
boolean
Event Notification Callback URL
event.notification.callback.url
The URL where your app can receive events. This is the Webhook URI that you noted in API Provider Setup.string
Callback Notification Signature Key
event.notification.signature.key
Optional
A user-defined key for added security to show that events have not been tampered with. This can be any custom value that you want passed to the callback handler listening at the provided Event Notification Callback URL.
string
tagsOptional. User-defined tags to further identify the instance.string