Last updated

What are webhooks?

Frontegg webhooks enable you to automate workflows by triggering specific actions when events occur in Frontegg's servers. This powerful feature allows seamless integration with your existing systems and enhances your application's responsiveness.


Webhook use cases

By leveraging Frontegg webhooks, you can streamline operations, improve user interactions with your app, and control and direct your user's journey in a way that fits your business needs.

Here are some examples of how you can utilize Frontegg webhooks:

  • Automating user registration: Automatically register a user in your internal database when they receive an invitation to join your application. This ensures that your records are always up-to-date without the need to manually log in any new user.
  • Marketing engagement: Send a personalized marketing email to users immediately after their first login. This can help welcome new users and introduce them to your app's features, thereby improving user engagement and retention.
  • Transactional workflow generation: Create complex transactional workflows based on user login activities. For instance, you can trigger security checks, log user activity, or update user status in real time, enhancing both security and user experience.

Frontegg webhooks IPs

Note the following list of Frontegg webhook IPs:

  • EU IPs: 99.81.198.187
    54.216.181.43
    52.209.54.22
  • US IPs: 23.21.59.58
    54.152.159.125
    3.220.173.9

Configuring webhooks

To create a new webhook connection, head over to your portal, and choose [ENVIRONMENT] âžś Integrations. The page lists all your webhooks and 3rd party integrations and allows you to create a new one.

Step 1: Create a webhook connection

Click the Connect button next to Webhooks. Fill in the webhook details for the display name and choose the events you want to subscribe to.

Step 2: Enter the URL address

Enter a valid URL to which you will receive the webhook data. The URL acts as an address where Frontegg sends a JSON message when the assigned event occurs. Only once you add a valid address you can test the webhook.


test


Step 3: Test your webhook request

Press the test button to check that your webhook is working. For the test to succeed, ensure that your URL endpoint is up and running and returns a 200 response to the webhook request.

Webhook response

Note that any 2XX response will be registered as success, while 4XX responses will be registered as failure. The response body can remain empty.

Set a webhook secret key

We strongly recommend protecting your webhooks by setting a Secret Key for each webhook connection you create.
Go to your webhook's Settings tab and under the Secret key field, enter your desired value. Frontegg will generate a header called x-webhook-secret and will sign the webhook request with that secret value.

To verify the hook's signature using thex-webhook-secret header, you should use a method from your backend library. For Node.js, you could use the following function:

jwt.verify(<x-webhook-secret-value>, <the secret in the dashboard on bhook settings>)

test


Webhook events

Webhooks in Frontegg cover multiple event types. Here's a list divided by categories:

Authentication events

EventEvent KeyWhen do we send it?
User authenticatedfrontegg.user.authenticateda user is authenticated
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 disables MFA

Account management events

EventEvent KeyWhen do we send it?
Group createdfrontegg.group.createda new group is created
Group deletedfrontegg.group.deleteda group was deleted
Group roles updatedfrontegg.group.roles.updatedgroup roles were updated
Group updatedfrontegg.group.updatedexisting group was updated
Group users addedfrontegg.group.users.addednew group users added
Group users removedfrontegg.group.users.removedusers removed from group
Domain restrictedfrontegg.account.security.domain.restricteddomain is forbidden from signing up

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 removed from tenantfrontegg.user.removedFromTenanta user is removed from tenant
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 authenticatedfrontegg.user.authenticateda user is authenticated
User SAML authenticationfrontegg.user.authenticatedWithSAMLuser authenticated using SAML
User SSO authenticationfrontegg.user.authenticatedWithSSOuser authenticated using SSO
User disabled MFAfrontegg.user.disabledMFAuser adisabled MFA
user MFA enrollfrontegg.user.enrolledMFAuser enrolled in MFA
user failed authenticationfrontegg.user.failedAuthenticationunsuccessful authentication attempt
user joined a tenant using an invitation linkfrontegg.user.joinedTenantUsingInvitationLinkUser joined a tenant using an invitation link
temporary access editedfrontegg.user.temporary.access.editedtemporary access was edited for user
temporary access givenfrontegg.user.temporary.access.givenaccess was given to a temporary user
Temporary user changed to permanentfrontegg.user.temporary.access.temporary.to.permanentdtemporary user changed to permanent
User updatedfrontegg.user.updatedUser profile has been updated

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

Custom webhooks

Frontegg lets you customize your webhooks, providing a more flexible and powerful way to create integrations with third-party tools. With custom webhooks, you can send data in real time to external applications, allowing you to create customized workflows that cater to your specific needs and automate repetitive tasks. Learn more about creating Custom Webhooks

Configure webhooks in your self-service portal

You need to toggle on that option to enable webhook management for your users in the self-service portal. The toggle is located on the left, as seen in the screenshot below:


test