This service allows to create incoming webhooks, in order to allow users to perform some actions directly, bypassing the endpoints authorizations.
- Generate webhooks for any user through Moleculer REPL
- Allow users to create their own webhooks with a secured endpoint
- Handle different kind of actions, depending on your needs
You generate a webhook by providing a user and an action. The action must be in the list of
allowedActions, in the settings.
Start Moleculer in REPL mode and call the
generate action like this:
POST to the
/webhooks endpoint as a logged-in user, providing the action that will be handled by this endpoint as JSON.
When you generate a webhook, you will receive an URI in response. You can then post JSON data to this webhook. It will be handled by the action(s) you defined.
If you wish, you can use the Bull task manager to queue incoming POSTs and make sure no data is lost.
All you need to do is add Moleculer's official Bull service as a mixin:
Please look at the official documentation for more information.