Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Authentication >

Xero Projects API is not working with current PHP libraries

Started by Wasimamjad Wasimamjad -   in API Authentication


We are working on xero projects API using PHP but the issue is current PHP library provided by xero developer support is not implementing Xero Projects API. Now I want to implement xero projects api, it gives following errors.

error 500
An error occurred in Xero. Please contact api@xero.com. Also check the API Status page https://status.developer.xero.com/ for current service status.

When we check on status page, it shows all API's are operational. But in the list xero projects API is not showing.

Accounting API ? Operational
Files API ? Operational
Payroll API ? Operational
Bankfeeds API ? Operational
Xero HQ API ? Operational
Assets API ? Operational
Signup API Operational

Can you please help me.
Thanks in advance
Best Reply as chosen by Wasimamjad Wasimamjad (Original Poster)
Hi there,

Just want to confirm that you are using this library - https://github.com/XeroAPI/XeroOAuth-PHP?

That "old" php library threw error when retrieving projects because by default the library's response is in xml.

The Projects API only support JSON thus you need to change the response type to JSON to get the library to work with Projects API. There is an example on how to do that here - https://github.com/XeroAPI/XeroOAuth-PHP/blob/master/tests/tests.php#L440

Welli Abdullah (Xero Staff)