Article ID: 3341, created on Nov 30, 2007, last review on Apr 18, 2012

  • Applies to:
  • H-Sphere


H-Sphere XML API includes several special Beans. AuthToken is a Bean used for authentication. It defines the following parameters: accountId (int), login (string), password (string), and role (Role).

System authentication is performed with login and password.

  • If accountId == 0, the system tries to choose the user's account.
    If the user has more than one account, the system responds with the respective fault message.
  • If accountId <> 0, the system tries to load the account with that accountId. If role is not empty, the system tries to drop permissions based on the values of the role parameter.


<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="" xsi:type="ns2:AuthToken" xmlns:soapenc="" xmlns:ns2="urn:DomainServices">
   <accountId xsi:type="xsd:int">0</accountId>
   <login xsi:type="xsd:string">wwwgrinia</login>
   <password xsi:type="xsd:string">grinia</password>
   <role xsi:type="ns2:Role" xsi:nil="true"/>

The Role parameter enables operating under a user identity different from the admin account. If the account has admin privileges, the system will try to switch to the Role user, and the accountId defined in the role tag will be regarded as the user identity. If accountId is 0, system will check if the user has only one account, and will operate under that account.


<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="" xsi:type="ns2:AuthToken" xmlns:soapenc="" xmlns:ns2="urn:MailServices">
  <accountId xsi:type="xsd:int">0</accountId>
  <login xsi:type="xsd:string">admin</login>
  <password xsi:type="xsd:string">adminpwd</password>
  <role href="#id1"/>
<multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="" xsi:type="ns3:Role" xmlns:ns3="urn:MailServices" xmlns:soapenc="">
  <accountId xsi:type="xsd:int">0</accountId>
  <login xsi:type="xsd:string">wwwgrinia</login>


Error Messages (SOAP Fault)

A standard error response in H-Sphere XML API looks like:

<soapenv:Envelope xmlns:soapenv="" xmlns:xsd="" xmlns:xsi="">
      <faultstring>Response from registrar server: null:-2008</faultstring>


  • soapenv:Fault - container for the error response;
  • faultcode - method where the error occured;
  • faultstring - error message;
  • detail - error details.

f213b9fa8759d57bee5d547445806fe7 6311ae17c1ee52b36e68aaf4ad066387

Email subscription for changes to this article
Save as PDF