# Configure Universal Login Template

**URL:** <https://community.auth0.com/t/configure-universal-login-template/140348>\
**Category:** Get Help\
**Tags:** signup-prompt-new-experience, login-experience\
**Created:** [August 3, 2024, 3:42am UTC](https://community.auth0.com/t/configure-universal-login-template/140348 "2024-08-03T03:42:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sranjani](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sranjani/32/60859_2.png) [@sranjani](https://community.auth0.com/u/sranjani)\
**Post date:** [August 3, 2024, 3:42am UTC](https://community.auth0.com/t/configure-universal-login-template/140348/1 "2024-08-03T03:42:01Z")

</div>

Hello, we are trying to configure the universal login template so that we can customize our signup page. However, when I try to add a template, I get a response code 400.

Here is the request code:  
var myHeaders = new Headers();  
myHeaders.append(“Content-Type”, “application/json”);  
myHeaders.append(“Authorization”, “Bearer Token”);

var raw = JSON.stringify([  
“string”,  
{  
“template”: “{%- auth0:head -%}{%- auth0:widget -%}”  
}  
]);

var requestOptions = {  
method: ‘PUT’,  
headers: myHeaders,  
body: raw,  
redirect: ‘follow’  
};

fetch(“[https://domain/api/v2/branding/templates/universal-login](https://domain/api/v2/branding/templates/universal-login)”, requestOptions)  
.then(response =\> response.text())  
.then(result =\> console.log(result))  
.catch(error =\> console.log(‘error’, error));

The response I get is:  
{  
“statusCode”: 400,  
“error”: “Bad Request”,  
“message”: “Payload validation error: ‘Data does not match any schemas from ‘oneOf’’.”,  
“errorCode”: “invalid\_body”  
}

I do not know what I am doing wrong since this was the example provided in the documentation.

Could anyone help me resolve this issue? Thanks!

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [August 5, 2024, 2:17pm UTC](https://community.auth0.com/t/configure-universal-login-template/140348/2 "2024-08-05T14:17:12Z")

</div>

Hi @sranjani

Welcome to the Auth0 Community!

Thank you for posting your question, to fix this line of code you will need to adjust the raw variable:

```auto
var raw = JSON.stringify({ // Correct JSON structure
  "template": "{%- auth0:head -%}{%- auth0:widget -%}"
});

```

Apart from that I would encourage you to try Auth0 CLI to easily update Page Templates → [https://auth0.com/docs/customize/login-pages/universal-login/customize-templates#using-the-auth0-cli-](https://auth0.com/docs/customize/login-pages/universal-login/customize-templates#using-the-auth0-cli-)

Thanks  
Dawid

---

<div class="post-metadata">

**Author:** ![sranjani](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sranjani/32/60859_2.png) [@sranjani](https://community.auth0.com/u/sranjani)\
**Post date:** [August 13, 2024, 7:51pm UTC](https://community.auth0.com/t/configure-universal-login-template/140348/3 "2024-08-13T19:51:59Z")

</div>

Hello David,

I tried setting a template with a Curl command with content type as text/html and it worked. Thank you for the response!

Regards,  
Shrividya

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [August 27, 2024, 7:52pm UTC](https://community.auth0.com/t/configure-universal-login-template/140348/4 "2024-08-27T19:52:41Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
