You are building Use Know this
A server-side app that many organizations will connect Standard authorization code flow (web app) A user signs in to Xero, picks the organizations and approves your scopes. You store and refresh tokens per connection and send the tenant ID with each call.
A desktop or mobile app, or anything that can't keep a secret Authorization code with PKCE Same user approval, without a client secret in the app. Token handling and tenant IDs work the same way.
A back-office job for one organization with no user present A Custom Connection Client credentials for one organization in Australia, New Zealand, the UK or the US, no refresh token or tenant header. Xero stops new Custom Connection apps and subscriptions on 1 December 2026; existing ones keep running, so a new build should be a standard OAuth 2.0 app.
That same one-organization job, outside those regions or without the subscription A web or PKCE app authorized once by an admin Someone approves it once, then your service refreshes the token on a schedule. Alert when a refresh fails, because nobody will be around to notice.