> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Customize Error Pages

> Learn how to create a custom error page for authorization error events.

When an authorization error occurs, and your callback URL is valid, the Authorization Server (Authorization Server: Centralized server that contributes to defining the boundaries of a user’s access. For example, your authorization server can control the data, tasks, and features available to a user.) returns the appropriate error and state parameters to your callback URL. If your callback URL is invalid, your application will display the [default Auth0 error page](/docs/docs/authenticate/login/auth0-universal-login/error-pages).

Your application may also display the default Auth0 error page for reasons other than an invalid callback URL, such as:

* Required parameters are missing when calling the Auth0 Authentication API [Login endpoint](/docs/docs/api/authentication#login).
* User opens an expired password reset link (when using the Classic Login experience).
* User navigates to a bookmarked login page and a [Default Login Route](/docs/docs/authenticate/login/auth0-universal-login/configure-default-login-routes) is not specified.

## Parameters

If you choose to configure a custom error page, the Authorization Server will return parameters appended to the URL as a query string.

| Parameter | Description |
| - | - |
| `client_id` | Identifier of the Auth0 application. |
| `connection` | Connection used at the time of error. |
| `lang` | Language set for use at the time of error. |
| `error` | Error code of the error. |
| `error_description` | Description of the error. |
| `tracking` | Identifier used by Auth0 to find errors in internal logs. |

Parameters presented vary depending on the error type and are specific to the request. For example, if the request which resulted in an error did not contain a `client_id`, the Authorization Server will not return the `client_id` parameter.

## Display a custom error page

If you want to display a custom error page, you have two options:

* Redirect users to a custom error page using either the Auth0 Dashboard or the Auth0 Management API.
* Configure Auth0 to render a custom error page on your behalf via the Management API.

### Redirect users to a custom error page using the Dashboard

Use the Dashboard to configure Auth0 to redirect users to a custom error page:

1. Navigate to [Auth0 Dashboard > Settings](https://manage.auth0.com/#/tenant/).
2. On the **General** tab, find the **Error Pages** section.
3. For **Default Error Page**, select **Custom**.
4. In the **Custom error page URL** field that appears, enter the URL of the error page you want your users to see.
5. Select **Save**.

### Redirect users to a custom error page using the Management API

Use the Management API (Management API: A product to allow customers to perform administrative tasks.) [Update Tenant Settings](/docs/docs/api/management/v2/#!/Tenants/patch_settings) endpoint. Replace the `{mgmtApiAccessToken}` placeholder value with your Management API Access Token (Access Token: Authorization credential, in the form of an opaque string or JWT, used to access an API.), and update the value of the `url` field in the JSON body to point to the location of the error page.

Using the Auth0 CLI? If you haven't already, [set up and authenticate your CLI session](/docs/docs/deploy-monitor/auth0-cli) before running this command.

| Value | Description |
| - | - |
| `MGMT_API_ACCESS_TOKEN` | [Access Token for the Management API](/docs/docs/secure/tokens/access-tokens/management-api-access-tokens) with the scope `update:tenant_settings`. |
| `show_log_link` | Indicates whether to show a link to the error in your tenant logs. Valid values are `true` and `false`. |
| `url` | Location of the custom error page to which you want to redirect. |

### Render a custom error page

When errors are shown as part of the Classic Login widget (such as an expired password reset link), an Auth0-hosted custom error page will not be rendered, even if configured.

Use the Management API [Update Tenant Settings](/docs/docs/api/management/v2/#!/Tenants/patch_settings) endpoint. Replace the `{mgmtApiAccessToken}` placeholder value with your Management API Access Token, and update the value of the `html` field in the JSON body to a string containing the HTML of your page.

You can use Liquid syntax to include the following variables:

* `{client_id}`
* `{connection}`
* `{lang}`
* `{error}`
* `{error_description}`
* `{tracking}`

| Value | Description |
| - | - |
| `MGMT_API_ACCESS_TOKEN` | [Access Token for the Management API](/docs/docs/secure/tokens/access-tokens/management-api-access-tokens) with the scope `update:tenant_settings`. |
| `show_log_link` | Indicates whether to show a link to the error in your tenant logs. Valid values are `true` and `false`. |
| `html` | HTML of the custom error page you want to render. |

To prevent XSS vulnerabilities, sanitize your custom template using Liquid's [escape](https://shopify.github.io/liquid/filters/escape/) and [strip\_html](https://shopify.github.io/liquid/filters/strip_html/) filters.
