> ## Documentation Index
> Fetch the complete documentation index at: https://nango.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# How to register your own Xero OAuth app

> Register an OAuth app with Xero and connect it to Nango

This guide shows you how to register your own app with Xero to obtain your OAuth credentials (client ID & secret). These are required to let your users grant your app access to their Xero account.

## Access requirements

Before you begin, note the following requirements for Xero:

| Pre-Requisites    | Status         | Comment                                                                                    |
| ----------------- | -------------- | ------------------------------------------------------------------------------------------ |
| Paid dev account  | ✅ Not required | Free, self-signup for a [Xero Developer account](https://www.xero.com/signup/developers/). |
| Paid test account | ✅ Not required | Developer account includes a demo company for testing.                                     |
| Partnership       | ✅ Not required |                                                                                            |
| App review        | ✅ Not required | Only required for apps published to the Xero App Store.                                    |
| Security audit    | ✅ Not required |                                                                                            |

## Setup guide

<Steps>
  <Step title="Create a Xero Developer account">
    Go to [Xero Developer signup page](https://www.xero.com/signup/developers/) and create a free account.
  </Step>

  <Step title="Create a new app">
    1. Log in to your [Xero My Apps](https://developer.xero.com/app/manage) developer console.
    2. Click **New app** in the top right corner.
    3. A new app form will appear. Enter a unique **App name**.
    4. Select **Mobile or desktop app** as the integration type.
    5. Fill in the **Company or application URL** and **Redirect URI** fields. For the Redirect URI, use: `https://api.nango.dev/oauth/callback`.
    6. Check the developer's terms checkbox and click **Create App**.
    7. Your app will be generated, and you will be redirected to your **App details** page.
  </Step>

  <Step title="Obtain API credentials">
    1. Navigate to the **Configuration** tab to retrieve your **Client ID** and **Client Secret**.
    2. Click **Generate a Secret** to create a new **Client Secret**.
    3. You will need these credentials when configuring your integration in Nango.
  </Step>

  <Step title="Configure your integration in Nango">
    Follow the [*Quickstart*](/getting-started/quickstart) to add your credentials to Nango.
  </Step>
</Steps>

## Important notes

* **Organization selection**: When a user authorizes your app, they select which Xero organization to connect. Your app can only access data for the selected organization.
* **Multiple organizations**: If you need to work with multiple Xero organizations, you'll need to handle the tenant context in your API calls. After a connection is created, Nango will automatically fetch and store the `tenant_id` in the connection config, which you can then use in your API calls.
* **Token refresh**: Make sure you add the `offline_access` scope to ensure the token refreshes as expected.

For more details on Xero's OAuth implementation, see [Xero's OAuth 2.0 authorization flow documentation](https://developer.xero.com/documentation/guides/oauth2/auth-flow).

***
