Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Endpoints >

API error status 412: Precondition failed

Started by Anthony Sims -   in API Endpoints


I am attempting to upgrade calls to use TLS1.2, and having some problems. The code is relying on the Guzzlephp (v3.8.1) package to make calls to the Xero server posting XML data, and since I have updated the Guzzle options to use CURL_SSLVERSION_TLSv1_2 I am now getting error status code: 412 Precondition Failed.

Any help would be greatly appreciated.

Kind Regards,
Hi Anthony, and everyone else who may find this post,

On windows 7 machines or older machines, you may need to install a fix to ensure that windows can handle TLS 1.1 or 1.2. I usually recommend this update as a first step as it mitigates not knowing how the underlying code, wrapper may work.


Especially important is to ernsure the easy fix that defaults the protocol is also applied.




Nicolas Emmerich