Webhooks
Last updated
Last updated
Basic idea of webhooks is to send user data to external systems in order to automate certain tasks like for example sending welcome email to newly created user.
On the left side of Defguard navigation you'll find webhooks page
On above form you'll see inputs like URL description token and triggers
URL is an URL on which data will be sent after certain triggers
Description short description of your webhook to remember it's use case
Secret token is a token sent with request in authorization header Note if receiver didn't implement any token check it'll do nothing
Triggers are events which will trigger the webhook
Below is list of all triggering actions with their request header and sample JSON body which will be sent on URL given at webhook creation.
Note all requests are using GET
method and sends data in body of request in JSON format.
Triggered after creating user
Header with name of trigger
X-Defguard-Event: user_created
Body example:
Triggered after modifying user
Webhook will be triggered on new user deletion sample request:
Header
X-Defguard-Event: user_modified
Request body example:
Triggered on deleting user
Header
X-Defguard-Event: user_deleted
Request body example:
{ username: "jdoe"}
Triggered after successfully provisioning YubiKey
Header
X-Defguard-Event: user_keys
request body example:
Note