Developer console
To create a webhook follow the steps below.- Navigate to your application in the Developer Console.
- Select the Webhooks tab.
- Click the Create webhook button.
- Select V2 from the drop-down list.
- Fill in the form.
- Click Create webhook button to save your changes.
Required fields
| Field name | Description | Required |
|---|---|---|
| URL Address | URL address to be notified by the webhook. | Yes |
| Content type | Type of content (file/folder) the webhook is configured for. | Yes |
| Triggers | Different triggers that activate the webhook. | Yes |
API
To attach a webhook to a folder, call the create webhook endpoint with the type offolder, the ID of the folder, a URL to send webhook notifications to,
and a list of triggers.
Webhooks do cascade, so if a webhook is set on a parent folder,
it will also monitor sub-folders for the selected triggers.
Ownership
It is best practice and strongly recommended to create webhooks with a Service Account, or user that will not be deleted, to avoid potential issues with webhook delivery due to loss of access to content. Similar to files and folders, webhooks are owned by a user. If a user who owns a webhook is deleted, they will lose access to all files and folders that they previously had access to. Their webhooks will begin to fail validation, but the webhook service will continue to send events and require retries.Webhook address
The notification URL specified in theaddress parameter must be a valid URL
that you specify when you create a webhook. Every time one of the triggers is
activated, this URL is called.
The notification URL must use standard port 443 and should return
an HTTP status in the range of 200 to 299 within 30 seconds of receiving
the webhook payload.
Webhook triggers
The triggers are a list of strings that specify the events which cause the webhook to fire. For example, if you want the webhook to be triggered when a user uploads a file, useFILE.UPLOADED.
You can find a list of available triggers in this guide.
