401 response from API
-
I am getting a 401 response when making a post request to the XML API with message: 'A logon request contained an invalid logon type value.' A google search shows this might be related to a Windows account setting, but am not sure.
I created an 'apiuser' account within MDaemon with global and domain administrator roles. Am using PHP and guzzle to make the HTTP POST request, below. (Simple example just to test connection functionality.) It's using basic authorizatin in the header via a base 64 encoded string of the MDaemon user and their password, e.g. "apiuser:<password>".
Has anyone else run into this before? Any help or guidance would be greatly appreciated!$xmlData = "<MDaemon> <API productversion=\"23.5.0\" serviceversion=\"23.5.0.2\"> <Request version=\"23.5\" echo=\"0\" verbose=\"0\"> <Operation>GetGlobalAdminList</Operation> <Parameters/> </Request> </API> </MDaemon>"; $response = $client->request('POST', $mailerDomain, [ 'headers' => [ 'Content-Type' => 'text/xml; charset=UTF8', 'Authorization: ' . $this->getAuthorizationHeaderValue(), ], 'verify' => false, 'body' => $xmlData, ]);
-
-
-
-
-
-
-
-
-
-
-
-
-