How to Get Xero API Access (and Why There Is No Simple API Key)
How Xero API access actually works, which app type you need, what the Xero API can connect, and when a Xero integration needs a developer.
How Xero API access actually works, which app type you need, what the Xero API can connect, and when a Xero integration needs a developer.
Business owners and finance managers who want Xero connected to another system and have been searching for a Xero API key.
How do I get Xero API access, and what can I actually connect Xero to?
Most people arrive at this looking for a single key to copy out of Xero settings, the way Tradify and several other platforms work. Xero does not do that. It uses OAuth 2.0, which means you register an application with Xero and receive a client id and client secret, then exchange those for an access token that your integration uses on each request.
That sounds like extra work, and it is, but the reason is worth understanding. A single permanent key that can read and write your entire ledger is a large risk if it leaks. OAuth tokens are scoped to specific permissions and expire on their own.
If you have been told to "just get the Xero API key", the honest answer is that the thing you actually need is a Xero app with a Custom Connection. The rest of this guide covers what that means.
Xero offers different app types, and picking the wrong one wastes a lot of time. In plain terms:
If your goal is "get our job management system talking to our Xero", you want a Custom Connection. If your goal is "let our customers connect their Xero to our product", you want a Standard app.
Check the current process before you plan around it. Xero changes its developer tooling and plan requirements from time to time. The shape above has been stable for a while, but confirm the detail on Xero's developer documentation rather than treating this page as the source of truth.
The Accounting API covers the parts of Xero most integrations need:
Separate APIs cover Payroll, Files, Projects and Assets. They are not part of the Accounting API, which surprises people who assume one connection covers everything. If your project involves timesheets or pay runs, you are dealing with the Payroll API and its own permissions.
Two things catch out most first integrations.
Access tokens are short lived. A Xero access token expires in about half an hour. Your integration has to use the refresh token to obtain a new one automatically, and it has to store the updated refresh token each time, because it changes. Integrations that skip this work perfectly in testing and then stop overnight.
Rate limits are per organisation. Xero applies both a per minute and a daily cap on API calls for each connected organisation. A first sync that loops through several years of invoices one at a time will hit the limit and start receiving errors. Bulk operations need batching, paging and a backoff strategy from the start.
Not every Xero connection needs a build. An honest split:
Deciding which system wins when the same contact changes in both is the hard part, not the API call.
Getting these wrong shows up in the accounts, not in an error log.
Volume, rate limits and matching against existing records all bite at once.
Award rates, overtime and allowances need to be exact, not close enough.
That is a Standard app with a certification path, a different project entirely.
The API itself is well documented and pleasant to work with. The cost sits in the mapping decisions, the edge cases and the monitoring, which is true of every accounting integration and is why they are worth doing properly the first time.
Tell us what you are comparing, replacing, or trying to improve. We will come back with a practical recommendation and realistic scope.