Knowledge Base

Connecting to Xero

Connecting to Xero

This guide walks you through creating a Xero App and connecting it to your Blesta installation.

Creating a Xero App

Step 1: Access the Developer Portal

  1. Go to developer.xero.com
  2. Sign in with your Xero credentials
  3. Click My Apps in the top menu

Step 2: Create a New App

  1. Click New app
  2. Fill in the app details:
    • App name: Your company name or "Blesta Sync"
    • Integration type: Select Web app
    • Company or application URL: Your Blesta URL
    • OAuth 2.0 redirect URI: Copy this from your Xero Sync settings page

Important: The redirect URI must match EXACTLY what is shown on your Xero Sync settings page, including the trailing slash if present.

  1. Accept the terms and click Create app

Step 3: Get Your Credentials

After creating the app:

  1. You will see your Client ID - copy this
  2. Click Generate a secret to create your Client Secret
  3. Copy the Client Secret immediately (it will only be shown once)

Configuring Blesta

Step 1: Enter Credentials

  1. Go to Tools → Xero Sync → Settings in Blesta admin
  2. Enter your Client ID
  3. Enter your Client Secret
  4. Click Save Settings

Step 2: Connect to Xero

  1. Click the Connect to Xero button
  2. You will be redirected to Xero to authorize the connection
  3. Select the organization you want to sync with
  4. Click Allow access
  5. You will be redirected back to Blesta

Step 3: Select Organization (Multi-Org)

If your Xero account has multiple organizations:

  1. After connecting, the Organization dropdown will appear
  2. Select the organization you want to sync
  3. Click Save Settings

Connection Status

On the Settings page, you will see:

  • Connected (green) - Successfully connected to Xero
  • Not Connected (red) - Connection required or expired

Token Refresh

The plugin automatically refreshes OAuth tokens before they expire. No manual intervention is required.

Disconnecting

To disconnect from Xero:

  1. Go to Settings
  2. Click Disconnect from Xero
  3. Confirm the action

Note: Disconnecting does not delete your sync mappings. You can reconnect and continue syncing.

Troubleshooting Connection Issues

Invalid Redirect URI

If you see a redirect URI error:

  1. Verify the URI in Xero matches EXACTLY what Blesta shows
  2. Check for http vs https differences
  3. Check for trailing slash differences
  4. Ensure no extra spaces were copied

Token Expired

If your connection stops working:

  1. Try clicking Connect to Xero again
  2. Reauthorize the connection
  3. Check that your Xero app has not been deleted

Access Denied

If Xero denies access:

  1. Ensure you are signing into the correct Xero account
  2. Verify you have admin permissions in Xero
  3. Check that the Xero app is still active
Please rate this article to help us improve our Knowledge Base.

0 0