No OTCSTicket in api/v1/auth header

Options

Hi All,

I am trying to authenticate with a otcs through the REST Api. When I send off a request to https://{myserver}/otcs/cs.exe/api/v1/auth with a valid username and password, I receive a StatusCode of 200 OK, but looking through the headers there is no OTCSTicket or ticket to grab in order to send through as authentication for other API calls. Can anybody share some insight on where I am going wrong on this?

        var uri = $"https://{myserver}/otcs/cs.exe/api/v1/auth";
        var request = new HttpRequestMessage();
        request.Headers.Add("Connection", new[] { "Keep-Alive" });
        request.Headers.Add("Cache-Control", "no-cache, no-store, must-revalidate");
        request.Headers.Add("Pragma", "no-cache");
        request.RequestUri = new Uri(uri);
        request.Method = HttpMethod.Post;
        request.Content = new StringContent($"username={userName};password={passWord}", Encoding.UTF8, "application/x-www-form-urlencoded");

        var httpClientHandler = new HttpClientHandler
        {
            Proxy = WebRequest.GetSystemWebProxy(),
            UseProxy = true,
            AllowAutoRedirect = true
        };

        using (var client = new HttpClient(httpClientHandler))
        {
            var response = client.SendAsync(request).Result;
            string ticket;
            var vals = response.Headers.TryGetValues("OTCSTicket", out IEnumerable<string> temp) ? temp : new List<string>();
            if (vals.Any())
            {
                ticket = vals.First();
            }

            return response.Content.ReadAsStringAsync().Result;
        }