Firebase currently does not have support for webhooks. This project is an attempt to fill that gap.
- Log in to the dashboard using your GitHub account.
- Use the form provided to add a webhook for the Firebase URL and event you'd like to listen on.
- Optionally provide a custom authentication token or Firebase Secret if the data at the provided path is not publicly readable.
- Fill in a payload URL which we can
POST
data to.
At your payload URL, you should start receiving POST
requests with a JSON body that looks like this:
{
"event": {
"ref": "The Firebase URL you provided to create this webhook.",
"type": "The Firebase event you're listening on for this webhook."
},
"ref": "The Firebase URL for this DataSnapshot.",
"key": "The key() of this DataSnapshot.",
"previous": "The previous child key emitted before this DataSnapshot.",
"value": "The exportVal() for this DataSnapshot."
}
Please note that updates may be sent again if the listening server is changed and needs to be redeployed.
This is a plaything. It may or may not send duplicate updates or none at all. It may or may not fall over. It may or may not hammer your server. Use with caution!
I'd love some help in making this a bit more robust and stable so that I feel comfortable removing the disclaimer above.
- validate form input (e.g. make sure URLs are URLs)
- add tests for dashboard
- add tests for webhook server/listeners
- add throttling/rate limiting
- stop webhook on hard failure (e.g.
new Firebase()
exceptions) - stop/pause webhook after
x
failed requests - log all webhook requests/responses for debugging