Problems with uploading universal login template via API -

Hello guys,

we switched to the universal login page. However, I’m not able to upload the template via the API. Even if I correctly get the bearer token, I’m able to get and update the branding theme, but not the universal login template.

I still get 404 when I try to upload the template as HTML and even for the get request below.

PUT https://{{AUTH0_DOMAIN}}/api/v2/templates/universal-login
authorization: Bearer {{AUTH0_ACCESS_TOKEN}}
Content-Type: text/html

<!DOCTYPE html>
<html lang="{{ locale }}">
  <head>
    {%- auth0:head -%}
  </head>

  <body class="_widget-auto-layout">
    {%- auth0:widget -%}
  </body>
</html>

It returns me 404 as follows:

{
“statusCode”: 404,
“error”: “Not Found”,
“message”: “Template does not exist.”,
“errorCode”: “inexistent_templates_universal_login”
}


And also even if tried to get the existing template.

GET https://{{AUTH0_DOMAIN}}/api/v2/branding/templates/universal-login
authorization: Bearer {{AUTH0_ACCESS_TOKEN}}

I got 404:

{
  "statusCode": 404,
  "error": "Not Found",
  "message": "Not Found"
}

I’m not sure what’s wrong, we use the custom domain, and also the login page is visible as I customized it with the no-code manager. I just want to add some bottom links to the page, but I’m not able to do it via the universal login page templates.

I’d really appreciate your help if you have tips what to try out next, it seems like a bug to me or like something is not enabled or so.

I’m sorry I accidentally switched the responses.

This response

{
“statusCode”: 404,
“error”: “Not Found”,
“message”: “Template does not exist.”,
“errorCode”: “inexistent_templates_universal_login”
}

is from the get request and this one is when I try to upload the template.

{
  "statusCode": 404,
  "error": "Not Found",
  "message": "Not Found"
}