Overview
Supported resources
Connect setup
Xero uses OAuth 2.0 with PKCE. You need an app registered in the Xero Developer Portal.1
Create a Xero app
Go to Xero Developer Portal → New app. Choose Web app and integration type Accounting. Under Configuration, copy the Client ID and Client Secret.
2
Add the redirect URL
In your app’s OAuth 2.0 redirect URIs list, add:
3
Configure required scopes
Enable the following scopes on your app:
openidprofileemailoffline_accessaccounting.invoicesaccounting.paymentsaccounting.banktransactionsaccounting.manualjournalsaccounting.contactsaccounting.settingsaccounting.reports.balancesheet.readaccounting.reports.profitandloss.readaccounting.attachmentsfiles
4
Connect via the widget
When your end user opens the Connect widget, they will enter the Client ID and Client Secret, then be redirected to Xero to authorize the connection.
Usage
Notes
- Pass
type: "ACCOUNTS_PAYABLE"oninvoicecreate to write a bill. The same pattern applies tocredit_note/vendor_credit. For vendor contacts, setis_supplier: true. addressandphone_numberids are discoverable inline oncontact.addresses[].idandcontact.phone_numbers[].id.