GetAuthenticationToken Operation

With GetAuthenticationToken you can Web Services program authenticate and retrieve an authentication token from the Appliance.

Request Parameters

The GetAuthenticationToken request parameters are:

Parameter Description Values Required Type
username A valid user account on the Appliance with “Web Service Access” enabled.   Yes String
password The password for the user account specified by username.   Yes String

Example

SOAP request for GetAuthenticationToken Operation:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:aut="AuthenticationService">
   <soap:Header/>
   <soap:Body>
      <aut:getAuthenticationToken>
         <!--Optional:-->
         <aut:username>admin</aut:username>
         <!--Optional:-->
         <aut:password>password</aut:password>
      </aut:getAuthenticationToken>
   </soap:Body>
</soap:Envelope>

Response

The attributes of a GetAuthenticationToken response is:

errorCode—An AuthenticationResult containing the authentication token string; an error code is included in the case of authentication failure. The response is number.

Example

SOAP response for GetAuthenticationToken Operation:

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:getAuthenticationTokenResponse xmlns:ns="AuthenticationService">
         <ns:return xsi:type="ax25:AuthenticationResult" xmlns:ax25="http://auth.services.logapp.loglogic.com/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <ax25:error_code>0</ax25:error_code>
            <ax25:token>admin+1Y2O2W261O1C1J1X291M371FN2T2D233H3G291O233G272J132R3D2P2A212IZE1XT15N1Z13</ax25:token>
         </ns:return>
      </ns:getAuthenticationTokenResponse>
   </soapenv:Body>
</soapenv:Envelope>

Status Codes

The Status Codes are:

0 No error
1 Invalid username and/or password

Example:

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:getAuthenticationTokenResponse xmlns:ns="AuthenticationService">
         <ns:return xsi:type="ax25:AuthenticationResult" xmlns:ax25="http://auth.services.logapp.loglogic.com/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <ax25:error_code>1</ax25:error_code>
            <ax25:token xsi:nil="true"/>
         </ns:return>
      </ns:getAuthenticationTokenResponse>
   </soapenv:Body>
</soapenv:Envelope>
2 Invalid authorization token

Example:

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:getAuthenticationTokenResponse xmlns:ns="AuthenticationService">
         <ns:return xsi:type="ax25:AuthenticationResult" xmlns:ax25="http://auth.services.logapp.loglogic.com/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <ax25:error_code>2</ax25:error_code>
            <ax25:token>/</ax25:token>
         </ns:return>
      </ns:getAuthenticationTokenResponse>
   </soapenv:Body>
</soapenv:Envelope>