Webhook/Callback documentation?

Is there any documentation on how the webhooks/callbacks work?

Some questions:

When are they triggered?
What data is sent with them?
How is it sent?
Do they support self signed ssl certificates?
What happens when they fail?
Are there any examples of callback parsing code?

1 Like

They’re triggered whenever Beeminder gets a new datapoint and nothing happens when they fail. If you wanted it to be super robust I think you’d want to periodically sync it with the datapoints endpoint of the API. The format is JSON and should be pretty self-explanatory. I’d recommend just setting the callback to something that echoes what it receives and then add a test datapoint to see what gets sent.

As for code that parses callbacks, check out Paul Fenwick’s Exobrain.

I’m guessing we don’t quibble about self-signed certs but I guess that too is easy to check. Let us know if you think we’re doing the wrong thing in that regard!

PS: Curious to hear what awesomeness you’re cooking up!

PPS: The original idea for this callback feature was to enable PESOS – keeping a realtime mirror on your own site of all your Beeminder data. It has turned out to mostly be useful for other, even awesomer, things.

I’ve written a super-simple script that takes in a callback and posts to other Beeminder goals. Inspired by PJF’s Exobrain, of course, it’s how I automatically update several of my goals.

My script is available as dance.pl in pjjh/bmndr

They occasionally fail silently, but work most of the time. For increased visibility, I’ve considered updating another Beeminder goal each time that the callback succeeds. UPDATE: done & committed.

1 Like

I need someone to format a URL to serve as my WebHook for Beeminder from HabitRPG. A while ago, I had a goal set from Zapier and I removed that part from the particular goal.

Hey @awesumpunk! Sorry to say, but I don’t understand your question. Here are some words that are probably irrelevant but potentially useful for others.

The WebHook URLs look pretty simple and are formatted like any other URL. Our WebHooks are triggered when a datapoint is added (or edited, or deleted) on Beeminder, i.e. they’re outbound rather than inbound. If you wanted inbound, that’s the Beeminder API.

If you’re confused at my confusion, then my own callback URLs look like this: http://example.com/bmndr/callback, with any of the components changed to match your webserver and endpoint. It gets set on the goal’s terrifyingly advanced settings page.

For calling into Zapier with a WebHook, according to the WebHook zap help page, theirs look like https://zapier.com/hooks/catch/n/Lx2RH/ which you should be able to copy from the zap that you set up.

2 Likes