Can't log in to the SOAP API

Discussion in 'Programming/Scripts' started by Tom Murphree, May 21, 2017.

  1. Tom Murphree

    Tom Murphree New Member

    Solved - see reply below.



    This is regarding the ISPconfig API.

    This is a sandbox, non-production implementation. Don't pick on me for posting passwords, URLs, etc.

    Problem
    I get "SOAP Error: Could not connect to host" when I try to connect to the SOAP API.

    Background
    To get started I:
    1. Created a remote user with admin / admin as my username and password. This matches the username and password I use to log into the web portal.
    2. Copied the login.php and soap_config.php files from the remoting_client folder of the installation files.
    3. Changed these values in soap_config.php:
    $soap_location = '[https - I can't post threads to this forum with links so I'm doing this]://10.5.14.35:8080/remote/index.php';
    $soap_uri = '[https - I can't post threads to this forum with links so I'm doing this]://10.5.14.35:8080/remote/';
    4. I made the world's simplest .php file to run the stuff: see attached (FYI - the php files are in a folder called 'php' & I don't think it's a path problem because the SOAP request is made).

    . . . ? Does anyone know what I'm missing?
     

    Attached Files:

    Last edited: May 26, 2017
  2. Tom Murphree

    Tom Murphree New Member

    The issue was that the SoapClient was trying to check the server's certificate.
    Stack Overflow helped me fix it: look for question 8443618.


     
    till likes this.

Share This Page