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”, 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!