Connect Xero using your own OAuth app

3 min read

Use your own Xero OAuth app to control the app name users see during authorization and the permissions your integration requests. This guide walks you through creating the app and adding its credentials to Composio.

Before you start

You need access to the Xero Developer Portal, the Xero organisation you want to connect, and your Composio project.

First, get the Redirect URI from Composio: open Auth Configs → Create, select Xero, and choose Your Own Credentials. Copy the Redirect URI shown in the form. Keep the form open while you create your Xero app in another tab, then return to enter the app credentials.

If you already have a Xero OAuth app and its Client ID and Client Secret, confirm its registered redirect URI matches Composio, then continue to Part 2.

Part 1: Create your Xero OAuth app

Step 1: Open the Xero Developer Portal

Sign in to the Xero Developer Portal, open your apps, and select New app.

Open the Xero Developer PortalOpen your apps and select New app

Step 2: Register your app

Enter your App name and Company or application URL. Select the Auth code flow for a web app.

For the Redirect URI, paste the exact value you copied from Composio before starting. Complete the required fields and select Create app.

Select Web app in the Xero registration form; app details, connection counts and redirect URI are redacted

Step 3: Copy your OAuth credentials

Open the app configuration and copy the Client ID. Select Generate a secret and copy the Client Secret. Store the secret privately.

Copy the Xero Client ID and generate a Client Secret

Confirm that the redirect URI registered in Xero exactly matches the value shown in Composio. Use the current value in your auth config if it differs from the example screenshot.

Part 2: Connect Xero in Composio

Step 1: Open Auth Configs

In your Composio project, select Auth Configs in the sidebar.

Open Auth Configs from the Composio sidebar

Select Create.

Select Create on the Auth Configs page

Step 2: Select Xero

Search for Xero in the Create Auth Config dialog and select the toolkit.

Search for Xero and select the OAuth 2.0 toolkit

Step 3: Add your credentials and permissions

Select Your Own Credentials. Enter the Client id and Client secret from your Xero app.

Copy the Redirect URI shown in the form into your Xero app's redirect settings. Keep the two values identical.

Select Your Own Credentials and enter the Xero client credentials

Keep the default scopes, or adjust them to match your integration's requirements. Composio includes these permissions when the user authorizes the connection. Select Create Auth Config.

Step 4: Connect your account

Open the saved Xero auth config and select Connect Account.

Open the saved Xero auth config and select Connect Account

Sign in to Xero if prompted. Review the app name, selected organisation, and requested permissions. Select Allow access when they match the access you intend to grant.

Review the requested Xero permissions and select Allow access

The consent screenshot illustrates a Composio-managed connection. Your own OAuth app can show a different app name and permissions.

Step 5: Confirm the connection is Active

After authorization, return to the auth config and open Accounts. Confirm that the connected account's status is Active. The auth config's separate Enabled label does not confirm that an account is connected.

Confirm the connected account shows Active in the Accounts tab

Your Xero account is connected. Use this auth config in your application.

Share