Subscribing To Webhooks

Overview

Frontegg allows developers to subscribe to webhooks in order to trigger automation workflows based on actions that occur on the Frontegg servers.

Examples use cases include:

  • Register user on internal DB when the user is invited
  • Send marketing email to the user upon first login
  • Generate specific transactional flows based on login actions

Read below to learn how to subscribe to webhooks.

Step-By-Step Guide

Follow the steps below to subscribe to webhook events.


STEP 1: Add a new hook

In your Frontegg Portal, go to Environments ➜ [NAME OF ENVIRONMENT] ➜ Hooks.


📘

For instance, go to the development environment at Environments ➜ Development ➜ Hooks.


Click on the "Webhooks" card:

1897

The webhooks page will open and list all your existing webhooks.
Click on the Add New hook button:

1897

STEP 2: Select The Triggering Events

Select one or multiple events that will trigger the webhook.

See below the list of Frontegg events and their meaning.

1897

STEP 3: Set Up The Webhook Details

  • URL - Enter the URL at which you will receive the webhook data. The URL acts like an address to which Frontegg can send a JSON message when the assigned events happen.

  • Secret key - Enter a value that is confidential. Frontegg will generate a header called x-webhook-secret and sign the webhook request using the secret.

For enhanced security, Frontegg recommends that you use the secret key.

📘

Webhook response

Any 2XX code will be registered as success
Any 4XX code will be registered as failure
The response body can remain empty.

1897

STEP 4: Test

To pass the test, make sure your URL endpoint is up and running and will return a 200 response to the webhook request.
You can also see an example of payload data that will be set.

1897

And you are DONE :clap:

1897

List of Frontegg Events

Authentication Events

EventEvent KeyWhen do we send it?
User authenticatedfrontegg.user.authenticateda user is authenticated
User authenticated with MFAfrontegg.user.authenticatedWithMFAa user authenticated using MFA
User SAML authenticationfrontegg.user.authenticatedWithSAMLa user is authenticated using SAML
User SSO authenticationfrontegg.user.authenticatedWithSSOa user is authenticated using SSO
User failed to authenticatefrontegg.user.failedAuthenticationa user tries to sign in and inputs incorrect credentials

MFA Events

EventEvent KeyWhen do we send it?
User MFA enrollfrontegg.user.enrolledMFAa user enrolls with MFA
User disabled MFAfrontegg.user.disabledMFAa user disabled MFA
User disabled the last MFA devicefrontegg.user.disabledLastMFADevicea user disabled the latest MFA device used

User Management Events

EventEvent KeyWhen do we send it?
User createdfrontegg.user.createda user is created
User signed upfrontegg.user.signedUpa user signs up
User deletedfrontegg.user.deleteda user is deleted
User invited to tenantfrontegg.user.invitedToTenanta user is invited to tenant
User changed passwordfrontegg.user.changedPassworda user changes their password
User forgot passwordfrontegg.user.forgotPassworda user forgets their password
User invited to tenantfrontegg.user.invitedToTenanta user was added or invited to tenant
User removed from tenantfrontegg.user.removedFromTenanta user is removed from tenant
User updatedfrontegg.user.updateda user property was updated
User API token createdfrontegg.userApiToken.createda user API token is created
User API token deletedfrontegg.userApiToken.deleteda user API token is deleted
User activatedfrontegg.user.activateda user activates their account
User accepted an email invitation to tenantfrontegg.user.acceptedInvitationToTenantan existing user accepted tenant invitation via email
User joined a tenant using an invitation linkfrontegg.user.joinedTenantUsingInvitationLinka user joined tenant using an invitation link

Tenant Events

EventEvent KeyWhen do we send it?
Tenant createdfrontegg.tenant.createda tenant is created
Tenant deletedfrontegg.tenant.deleteda tenant is deleted
Tenant updatedfrontegg.tenant.updateda tenant is updated
Tenant API token createdfrontegg.tenantApiToken.createda tenant API token is created
Tenant APi token deletedfrontegg.tenantApiToken.deleteda tenant API token is deleted

Domain Restriction Events

EventEvent KeyWhen do we send it?
Domain was added to signup restrictionfrontegg.account.security.domain.addeda new domain was added to a list of domains restricted for signup
Domain was removed from signup restrictionfrontegg.account.security.domain.removeda domain was removed from a list of domains restricted for signup
Domain was restricted from signupfrontegg.account.security.domain.restricteda user with restricted domain was blocked or allowed to signup
Domain restriction strategy changedfrontegg.account.security.domain.strategy.changeddomain restriction policy has changed
Domain signup restriction enabledfrontegg.account.security.domain.enableddomain restriction settings were enabled
Domain signup restriction disabledfrontegg.account.security.domain.disableddomain restriction settings were disabled

IP Restriction Events

EventEvent KeyWhen do we send it?
IP restriction rule addedfrontegg.account.security.ip.addedIP address was added to IP restrictions list
IP restriction rule removedfrontegg.account.security.ip.removedIP address was removed from IP restrictions list
IP restriction strategy changedfrontegg.account.security.ip.strategy.changedIP restriction policy has changed

📘

Creating a new environment

When copying a project from one environment to another, webhooks configurations are not being copied between the environments.