Up until a month or so ago our interface to AC was working just fine. But now whenever our code makes a call to
https://url/public/api/v1/issue-token
we now get back a 700 plus lines of html with the message "Something went wrong. Please contact the technical support.", instead of a json response.
I haven't found anything yet that would explain this error message. The cert is self signed, but has been for quite some time and the interface was working with it previously. This set of code hasn't been changed in over six months, again, working fine previously.
I'm fairly certain that the page itself is returned from AC as the contents of the header section returned by the API and the header section from the standard AC login page are the same. The html element from the API response is below.
<!DOCTYPE html>
<html lang="en-us"
xml:lang="en-us"
xmlns="http://www.w3.org/1999/xhtml"
ng-controller="AngieApplicationController"
class="{{ wireframe.get_theme() }}"
ng-class="{
unauthorized : wireframe.initialized && wireframe.authorized === false,
initialized : wireframe.initialized
}">
<head>
Any thoughts, ideas, suggestions of where to turn next?
AC5TokenRequest tokenRequest = new AC5TokenRequest { username = username, password = password, client_name = clientApp, client_vendor = clientVendor };
HttpWebRequest wr = (HttpWebRequest)WebRequest.Create(baseUrl + "/issue-token");
wr.Method = "POST";
wr.ContentType = "application/json;charset=utf-8";
UTF8Encoding encoding = new UTF8Encoding();
string request = SerializationHelper.ToJSON(tokenRequest);
byte[] bytes = encoding.GetBytes(request);
wr.ContentLength = bytes.Length;
using (Stream requestStream = wr.GetRequestStream())
{
requestStream.Write(bytes, 0, bytes.Length);
}
using (Stream response = wr.GetResponse().GetResponseStream())
using (TextReader tr = new StreamReader(response))
{
string responseText = tr.ReadToEnd();
JObject jo = JObject.Parse(responseText);
if((bool)jo["is_ok"] == true )
{
accessToken = (string)jo["token"];
}
}