Dropbox webhooks bring real-time change notifications to server-side apps

Dropbox has announced webhooks, a new way for server-side applications to receive real-time notifications when file changes occur in Dropbox. Previously, low-latency notifications were only available to client-side apps through longpoll_delta or the built-in notifications in the Sync API. Webhooks now give server-side apps the same capability, removing the need for constant polling.

A webhook lets a developer register a URI to receive notifications based on a trigger. In Dropbox's case, notifications are sent to your webhook URI whenever a user of your app makes a file change. The webhook payload consists of a list of user IDs who have changes. Your app then uses the standard delta method to determine what changed and take appropriate action.

Use cases and early adoption

Webhooks are suited for any app that needs to react quickly to Dropbox changes. The webhooks tutorial demonstrates an example app that converts Markdown files to HTML as soon as they are added to Dropbox.

Before the public release, Dropbox tested webhooks in private beta with several companies to observe how the feature would perform in real-world applications.

Picturelife, a service for securely storing photos and videos in the cloud, was one of the beta participants. Nate Westheimer, CEO of Picturelife, described the benefit: rather than making thousands of polling requests, their backend sync services now wait for users to make changes and then only make the requests they need. He noted that this also improves the customer experience, providing the most up-to-date state as soon as users log in.

Slack, which provides real-time messaging, archiving, and search for teams, also participated. Engineer Myles Grant said the implementation took only a weekend and replaced dedicated polling servers with their standard event-handling infrastructure, while delivering an instantaneous experience for users.

Getting started

Developers can get started with the webhooks tutorial and reference documentation on the Dropbox developer site. Feedback can be shared via the developer forum.