10 Replies Latest reply on Oct 17, 2012 9:42 AM by bellwood

    401 Access Denied using the WSDL API

    bellwood

      I am running ipMonitor 10.6 and cannot for the LIFE of me connect to the WSDL via code.

       

      I can see the URL in my browser just fine, but, on the same machine, via code, I immediately get a 401 Access Denied error whether I use SOAP or CURL.

       

      Documentation is dry at best and there aren't many examples out there.

       

      $context = stream_context_create(array('ssl' => array('verify_peer' => FALSE)));

       

       

      $soapURL = 'https://domain.com/soap/status.asmx?wsdl';

      $soapParameters = array  (

                  'login' => 'user',

                  'password' => 'password',

                  'WSDL' => TRUE,

                  'stream_context' => $context

                  );

      $soapClient = new SoapClient($soapURL,$soapParameters);

       

      And that yields:

       

      HTTP request failed! HTTP/1.0 401 Access Denied