Can some explain to why this plain vanilla JS returns a 401 error?
fetch(“https://api.monday.com/v2”,{
mode: ‘no-cors’,
method: ‘post’,
headers: {“Authorization”: sToken,
“Content-type”: “application/json”,
“Accept”: “application/json”,
“Access-Control-Allow-Origin”: “*”,
“Access-Control-Allow-Credentials”: “true”},
body: JSON.stringify(sQry)}
)
Both sToken and sQry are correctly assigned beforehand.