Login Issues - accountsIQ/API-Wiki GitHub Wiki
This page describe common login issues.
PHP
Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from ....
This is likely due to misconfiguring the request. The following sample shows how to configure your login request:
<?php
$wsdlUrl = "https://hostacct.com/system/dashboard/integration/integration_1_1.asmx?wsdl";
$opts = array(
'ssl' => array(
'verify_peer'=>true,
'verify_peer_name'=>true,
'crypto_method' => STREAM_CRYPTO_METHOD_TLS_CLIENT)
);
$params = array(
'soap_version'=>SOAP_1_1,
'exceptions'=>true,
'trace'=>0,
'cache_wsdl'=>WSDL_CACHE_NONE,
'stream_context' => stream_context_create($opts)
);
$client = new SoapClient($wsdlUrl, $params);
$vars = array(
'companyID'=>'YOUR_COMPANY_ID',
'partnerKey'=>'YOUR_PARTNER_KEY',
'userKey'=>'YOUR_USER_KEY');
$result = $client->Login($vars);
echo $result->LoginResult
?>
The LoginResult is your authentication token to be used in all subsequent API calls.