Slide 1

Slide 1 text

Dropbox Webhooks or “Don’t call me. I’ll call you.” Steve Marx @smarx [email protected]

Slide 2

Slide 2 text

Polling

Slide 3

Slide 3 text

Long-polling

Slide 4

Slide 4 text

Long-polling with multiple users

Slide 5

Slide 5 text

Webhooks!

Slide 6

Slide 6 text

Adding a webhook

Slide 7

Slide 7 text

The verification request GET webhooksdemo.webscript.io/?challenge=abc123 HTTP/1.1 User-Agent: DropboxWebhooks/1.0 --- HTTP/1.1 200 Content-Length: 6 abc123

Slide 8

Slide 8 text

A notification request POST webhooksdemo.webscript.io/ HTTP/1.1 User-Agent: DropboxWebhooks/1.0 X-Dropbox-Signature: 938f38e2b76dc0e69cfd7ea0735d251567… Content-Type: application/json {"delta": {"users": [12345678]}} --- HTTP/1.1 200 Content-Length: 0

Slide 9

Slide 9 text

A notification request POST webhooksdemo.webscript.io/ HTTP/1.1 User-Agent: DropboxWebhooks/1.0 X-Dropbox-Signature: 938f38e2b76dc0e69cfd7ea0735d251567… Content-Type: application/json {"delta": {"users": [12345678]}} --- HTTP/1.1 200 Content-Length: 0 HEX(HMAC_SHA256(app_secret, request_body))

Slide 10

Slide 10 text

Let’s see some code!

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

Eat, drink, and use webhooks.