Skip to main content
Hooks will reach end of life (EOL) on April 30, 2027.
  • As of October 16, 2023, Hooks are no longer available in newly created tenants.
  • As of November 18, 2024, Hooks are read-only. Active Hooks still run, and you can enable or disable them and change their configuration values and secrets. You can’t edit their code in the Dashboard, the Management API, or tools that use it, such as the Auth0 CLI, Deploy CLI, Terraform, and Agent Skills.
  • After April 30, 2027, Hooks stop running and are removed.
Use Actions to extend Auth0:
You can create multiple hooks using the Dashboard or . You can also import and export hooks using the Deploy Command-Line Interface (CLI) tool.
Although you may create multiple hooks for any given extensibility point, each extensibility point may have only one enabled hook at a time. Any subsequent hooks you create for that extensibility point are automatically disabled, so you must explicitly enable them. The enabled hook will be executed for all applications and APIs.
Optionally, you can add secrets (such as Twilio Keys or database connection strings) to hooks.

Use the Dashboard

  1. Go to Auth0 Dashboard > Auth Pipeline > Hooks, and click +Create.
  2. Enter a descriptive name for your hook, select the extensibility point for which the hook should execute, and click Create.
  3. Locate the section for the extensibility point you selected, and click the pencil icon next to the hook you created.
  4. Update the hook using the Hook Editor, and click the disk icon to save.

Use the Management API

Make a POST call to the Create a Hook endpoint. Be sure to replace MGMT_API_ACCESS_TOKEN, HOOK_NAME, HOOK_SCRIPT, and EXTENSIBILITY_POINT_NAME placeholder values with your Management API , Hook name, Hook script, and extensibility point name, respectively.
Using the Auth0 CLI? If you haven’t already, set up and authenticate your CLI session before running this command.

Handle rate limits when calling APIs from within Hooks

If you call Auth0 APIs from within a Hook’s script, you will need to handle rate limits. To do so, check the X-RateLimit-Remaining header and act appropriately when the number returned nears 0.Additionally, add logic to handle cases in which you exceed the provided rate limits and receive the 429 HTTP Status Code (Too Many Requests). In this case, if a re-try is needed, it is best to allow for a back-off to avoid going into an infinite retry loop.
To learn more about Auth0 rate limiting for Hooks, read Rate Limits.

Learn more