Hi, I am trying to use the API as documented here: https://www.espocrm.com/documentatio...pi-client-php/
I have created a new instance on the cloud server for testing, and have copied and pasted the sample code at the end of the above article.
The code is throwing the exception on line 131 of the sample. For clarity here are the lines of code either side of that exception:
Using a bit of debug I have worked out that the error responseCode is 404 and the errorMessage is 'EspoClient: Unknown Error'
The URL being called is https://s4-applications.espocloud.eu//api/v1/Lead which is valid.
Help and guidance appreciated.
Thanks.
I have created a new instance on the cloud server for testing, and have copied and pasted the sample code at the end of the above article.
The code is throwing the exception on line 131 of the sample. For clarity here are the lines of code either side of that exception:
PHP Code:
if ($responseCode == 200 && !empty($parsedResponse['body'])) {
curl_close($ch);
return json_decode($parsedResponse['body'], true);
}
$header = $this->normalizeHeader($parsedResponse['header']);
$errorMessage = !empty($header['X-Status-Reason']) ? $header['X-Status-Reason'] : 'EspoClient: Unknown Error';
curl_close($ch);
throw new \Exception($errorMessage, $responseCode);
}
Using a bit of debug I have worked out that the error responseCode is 404 and the errorMessage is 'EspoClient: Unknown Error'
The URL being called is https://s4-applications.espocloud.eu//api/v1/Lead which is valid.
Help and guidance appreciated.
Thanks.
Comment