Simple Web Server for Webhooks

This page will show you how you can create a simple HTTP web server to receive webhooks from the BlueBubbles Server.

Goal

The goal of this page is to show you how you can do some automation around iMessage using the BlueBubbles Server and the webhook events that it emits.

Building the HTTP Web Server

Before setting up any webhooks with the BlueBubbles Server, you need to create a web server to receive the webhook requests that the server will be emitting.

There are tools out there built for automation that do this for you such as n8n. However, if you want full controller over the code, I recommend building a webserver yourself.

Here are some quick implementation code in various languages.

Creating a Webhook

Once you've built your HTTP server, note the port that the server runs on (if running it on localhost).

Open up the BlueBubbles Server and open the API & Webhooks page. Then click on the Manage drop down, and select Add Webhook

In the popup, enter your webserver's URL + port (if on localhost). Here is an example where my localhost webserver is listening on port 8000:

Next, select the events you want to subscribe to from the Event Subscriptions drop down.

Lastly, hit save. You should see your new entry show up in the table.

Assuming your webserver is running, it should now receive HTTP POST requests when the subscribed events are emitted from the server!

If you have a cool automation project, please share it with us in our Discord! We love to see all the cool ways people are using BlueBubbles and its' API!

Last updated