This is a node.js application that listens for all events on BigBlueButton and sends POST requests with details about these events to hooks registered via an API. A hook is any external URL that can receive HTTP POST requests.
You can read the full documentation at: https://docs.bigbluebutton.org/development/webhooks
There are a few dependencies that need to be installed before you can run this application. Their minimum versions are listed below.
| Dependency | Minimum version |
|---|---|
| Node.js | >= v18.x |
| npm | >= v7.x |
| Redis | >= v5.0 |
With a working development environment, follow the commands below from within the bigbluebutton/bbb-webhooks directory.
Install the node dependencies:
npm install
.nvmrc file or package.json's engines.node property.Configure the application:
cp config/default.example.yml config/default.yml
touch config/development.yml
bbb.serverDomain and bbb.sharedSecret values to match your BBB server configuration in the newly created config/development.yml.Stop the bbb-webhook service:
sudo systemctl stop bbb-webhooksRun the application:
npm startIf you want all webhooks from a BBB server to post to your 3rd party application/s, you can modify the configuration file to include permanentURLs and define one or more server urls which you would like the webhooks to post back to.
To add these permanent urls, do the following:
sudo nano config/development.ymlmodules."../out/webhhooks/index.js".config.permanentURLs property to the configuration file, and add one or more urls to the url property. You can also add a getRaw property to the object to specify whether or not you want the raw data to be sent to the url. If you do not specify this property, it will default to false.
../out/webhooks/index.js:
config:
permanentURLs:
- url: 'https://staging.example.com/webhook-post-route'
getRaw: false
- url: 'https://app.example.com/webhook-post-route'
getRaw: true
Once you have adjusted your configuration file, you will need to restart your development/app server to adapt to the new configuration.
If you are editing these permanent urls after they have already been committed to the application once, you may need to flush the redis database in order for adjustments to these permanent hooks to get picked up by your application. Use the following command to do so:
redis-cli flushallFollow the commands below starting within the bigbluebutton/bbb-webhooks directory.
Copy the entire webhooks directory:
sudo cp -r . /usr/local/bigbluebutton/bbb-webhooksMove into the directory we just copied the files to:
cd /usr/local/bigbluebutton/bbb-webhooksInstall the dependencies:
npm installCopy the configuration file:
sudo cp config/default.example.yml config/default.ymlserverDomain and sharedSecret values to match your BBB server configuration:
sudo nano config/default.ymlStart the bbb-webhooks service:
sudo systemctl bbb-webhooks restartA sample docker-compose for convenience that should get the application image built and running with as little effort as possible. See the Dockerfile and docker-compose.yml for more details.
To build and run the application image, run the following command from within the root directory of the project:
docker-compose up -d
To stop the application, run the following command from within the root directory of the project:
docker-compose down
The container runs with the default Node container user, node. To override it,
feel free to set the user property in the docker-compose.yml file (e.g.: user: ${UID}:${GID}).
The application configuration can be modified by creating and editing an override
file in /etc/bigbluebutton/bbb-webhooks/production.yml. The file will be mounted
into the container and its contents will be merged with the default configuration.
The only exception to this are array attributes, which are replaced.
The default configuration file used by the container can be found at config/default.example.yml.
As an example, suppose you want to override the bbb.serverDomain and
bbb.sharedSecret values as well as enable the out/xapi module. You would
create the following override file:
bbb:
serverDomain: 'bbb.example.com'
sharedSecret: 'secret'
modules:
../out/xapi/index.js:
enabled: true
The rest of the configurable attributes can be found in the default configuration file at config/default.example.yml.
Content type
Image
Digest
sha256:7ac1f9a3b…
Size
69.6 MB
Last updated
about 1 month ago
docker pull mconf/bbb-webhooks:v2.7.0