Skip to content

Instantly share code, notes, and snippets.

@cggaurav
Created December 7, 2018 03:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cggaurav/0daaa8cda04b13e49aafabe2df91ee87 to your computer and use it in GitHub Desktop.
Save cggaurav/0daaa8cda04b13e49aafabe2df91ee87 to your computer and use it in GitHub Desktop.
Dropbox WebHook
// How Dropbox handles webhooks: https://www.dropbox.com/developers/reference/webhooks
router.get('/api/dropbox/webhook', function (ctx, next) {
return new HTTPRequest({ ctx }).handle((request) => {
ctx.set('Content-Type', 'text/plain')
ctx.set('X-Content-Type-Options', 'nosniff')
ctx.body = request.data.challenge
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment