Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > Find a Developer >

Laravel PHP OAuth 1 library with OAuth2

Started by Luis Ruani -   in Find a Developer


We have a small system to search for clients that has a domain contract with us generating invoices from Xero. It is set up in Laravel with OAuth1. We are using a private connection.

So, my questions are:

- Is it possible to keep using this library https://github.com/XeroAPI/XeroOAuth-PHP with OAuth2 without having to re-create all the calls?

- If so, can you provide the steps to accomplish this?

Hi Luis,

We have faced such an issue of OAuth migration with .NET SDK in one of a client project.

Xero API Request and Response has not changed a lot due to OAuth migration. The only mechanism for authentication has changed.

In order to not rewrite all API calls with the new SDK, we had done some customization to the old Xero .NET SDK, where we used OAuth2.0 code from the latest Xero SDK and merge it with Old SDK, so the authentication problem got solved and also updated relevant API calls to add OAuth 2.0 authorization header in the request.

Authorization: "Bearer " + access_token
xero-tenant-id: tenantId

this is a workaround; you need to take this approach if the use of the latest SDK is more time-consuming than rewriting some of the code in old SDK as specified above.

feel free to get in touch on chintan@satvasolutions.com if you need further help.


Chintan Prajapati  

Hi Chintan,

Thanks for the reply. I'll contact you.


Luis Ruani