Overview
This article will explain how to add a Custom Login Page for a specific client through the Management API.
Applies To
- Custom Login Page
- Management API
Solution
Although there is no setting in the Dashboard indicating a Custom Login Page in the settings of a certain application in the Auth0 Dashboard under Applications > Applications > your-application, it is possible to insert a field called “custom_login_page” directly into the client’s JSON body using the Management API, which will create a Custom Login Page for that certain application.
To add the "custom_login_page
, the endpoint PATCH /api/v2/clients/{id}
should be called with the custom_login_page
that needs to be added.
Follow these steps to achieve this goal through Management API:
- Copy the Management API token found in the Auth0 Dashboard under APIs > Auth0 Management API > API Explorer > Token
- Access the Management API Documentation
- In the Management API, go to Clients > Update a client
- In the
path: ID
section, write the client ID of the application that needs to be changed, found in the Auth0 Dashboard under Applications → Applications - In the body, if the only change is to the custom login page, delete the whole body and leave only the key for the custom login page, followed by its value
- Alternatively, update other parts of the client. Here is an example of how this could look like:
{
"custom_login_page":"<h1>Hello World</h1>"
}
- Click on Test Endpoint
PLEASE NOTE: To reset the custom login page, please follow the steps above, but in the body, the value of the custom_login_page
should be an empty string. Please see the following code for an example:
{
"custom_login_page":""
}