Hello Team,
we are using CS 10.5 Update 2014-03 , OTDS 10.5 SP1 Patch level 6. We havent enabled SSO and no LB , everything CS FE & BE runs in only one server(no horizontal/vertical clustering). This is PROD ENV.
We build a sample html page, which authenticates with valid credentials to get token. This token is later used to upload a file in EWS. This code perfectly works fine in DEV ENV , however when tested in PROD we are getting "HTTP Error 401 , Invalid Credentials" for getting token.
My HTML JS Script CODE is : (change env specfic elements if required)
authenticate("otadmin@otds.admin","PassWord");
function authenticate(userName, password) {
log("Authenticating to CS");
xhr.open("POST", "http://myserver/otcs/llisapi.dll/api/v1/auth", false);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.onreadystatechange = authResponseHandler;
log("Sending auth");
xhr.send("username=" + userName + "&password=" + password);
}
function authResponseHandler() {
if (4 == xhr.readyState) {
log("Auth req status: " + xhr.statusText);
log("Auth response: " + xhr.responseText);
if (200 == xhr.status) {
var auth = JSON.parse(xhr.responseText);
ticket = auth["ticket"];
log("Auth Ticket:" + ticket);
}
}
}
PS: The supplied credentials are valid and i am able to login into CS via GUI. I also tried with multiple valid credentials, but resulted in error 401 invalid credentials.
Any inputs to resolve?