Kaseya Community

Using SOAP API with VBScript

  • I am completely new to SOAP and Kaseya API so if this is a duplicate thread, I apologize.

    I am looking into writing a simple interface with VBScript to start with in order to understand the SOAP concepts. I have looked at examples in http://localhost/vsaWS/kaseyaws.asmx but they all seem to require a session ID.

    Can someone tell me how to obtain a session ID programatically and pass it to SOAP request?

    I have also tried the TestClient but I do not know how it generates session ID's. (This tool stopped working for me after SP1 installation.)

    Thanks.
    Akira

    P.S.
    The session ID may not be my problem. When I run my script, it returns "200 OK" as the status but instead of SOAP response, I get an HTML page with a logon form. I must not be sending (POSTing) the request properly.

    Legacy Forum Name: Using SOAP API with VBScript,
    Legacy Posted By Username: Akira Kato
  • Hi Akira,

    The sessionid is required for any interaction with the API. Basically in order to authenticate to the API you pass in the username and a hashed password. The password is hashed by the hash.dll file that is found in your Kaseya distribution. Once the hashed password and the username authenticate, the authenticate API method returns a session id. This id is then used to validate any call made to the API. Without the session id, you will not retrieve any data back from the web services calls.

    Regarding your SOAP packages, if you are familiar with Visual Studio, it handles the SOAP calls for you via web references. I would suggest writing a class to handle the API calls via web references and then simply build out your objects and call the services via the objects methods.

    I hope this helps.

    Legacy Forum Name: How-To,
    Legacy Posted By Username: sjavera