I try to use login endponit to get access token. My request is like this:
POST: http://{MY_IP_SERVER}/ServerAPI/ServerCommandService.asmx
HEADER: ContentType: text/xml
BODY:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xsd=“http://www.w3.org/2001/XMLSchema”
xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”>
soap:Body
<Login xmlns="[http://videoos.net/2/XProtectCSServerCommand](http://videoos.net/2/XProtectCSServerCommand)">
<instanceId>1234</instanceId>
<User>{user}</User>
<Password>{password}</Password>
</Login>
</soap:Body>
</soap:Envelope>
The response is 401.
What’s wrong?
Thanks
When using basic user you must use HTTPS..
https://doc.developer.milestonesys.com/html/index.html?base=gettingstarted/intro_soap_protocols.html&tree=tree_3.html
This same code might work on HTTPS, please make sure you have created the user in XProtect.
Thanks for your quickly response.
The response of services y like this:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>401 - No autorizado: acceso denegado debido a credenciales no v�lidas.</title>
<div id="header">
<h1>Error del servidor</h1>
</div>
<div id="content">
<div class="content-container">
<fieldset>
<h2>401 - No autorizado: acceso denegado debido a credenciales no v�lidas.</h2>
<h3>No tiene permiso para ver este directorio o esta p�gina con las credenciales que ha proporcionado.
</h3>
</fieldset>
</div>
</div>
The error more expcefic is “Unauthorized: Access Denied Due to Invalid Credentials”
Espanish:
“No autorizado: acceso denegado debido a credenciales no validas”
English:
“Unauthorized: Access Denied Due to Invalid Credentials”
Maybe I have problem in request’s body. is It ok use User and Password parameters in body?
I did sign up my user in Xprotect and I can login in management and video client successfully
Thanks