Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Authentication >

API Authentication details for existing Xero account

Started by Eoin Dennehy -   in API Authentication

Hi, I want to test that i can integrate with an existing account my client is currently using - how do I go about getting the necessary auth details for this account? (I'm currently a read-only user on their account) Eventually I want to use the Xero API to pull data from this account, I just want to verify I can do it correctly first. Thank you.
Hi Eoin,

You'll need to authenticate to use the API via OAuth1: https://developer.xero.com/documentation/auth-and-limits/private-applications
or oauth2: https://developer.xero.com/documentation/oauth2/overview

In both cases you will need to be a standard user not a read-only user however, so currently you wouldn't be able to connect an app to the organisation.

Hope this helps,


Steven Brown (Xero Staff)  

Thanks alot for the reply. I realise now it was a bit of a stupid question. After i watched the helpful video for .NET sample project everything made sense.

I still have 1 more question: My client has 2 organisations, and in my app i will need to pull data from both organisations simultaneously for a few features. Is this possible?

Eoin Dennehy  

Hi Eoin,

If you decide to go with OAuth1.0 then to connect to two orgs at the same time you would need to use a Public or a Partner app as a private app can only be connected to a single org. If you use OAuth2, there isn't this distinction so you would need the app to be connected to both orgs.
If you use a public app, you'll have to get the customer to reconnect the app every 30 minutes, so I'd suggest starting with an OAuth2 app and going from there.



Steven Brown (Xero Staff)