Knowledge Base

Connection Issues

Connection Issues

Troubleshooting problems connecting to Xero.

Cannot Connect to Xero

Symptoms: "Connect to Xero" fails or shows error

Check Redirect URI

The most common issue is a redirect URI mismatch.

  1. Go to Settings in the Xero Sync plugin
  2. Copy the Callback URL exactly as shown
  3. Log into developer.xero.com
  4. Open your app settings
  5. Paste the URL into OAuth 2.0 redirect URIs

Important: The URL must match EXACTLY:

  • Include or exclude trailing slash as shown
  • Check http vs https
  • No extra spaces

Verify Credentials

  1. Confirm Client ID is correct (no extra spaces)
  2. Try regenerating the Client Secret in Xero
  3. Copy and paste carefully - secrets are long

Check Xero App Status

  1. Log into developer.xero.com
  2. Go to My Apps
  3. Verify your app is not deleted or disabled
  4. Confirm app type is Web app

Connection Keeps Dropping

Symptoms: Works initially, then stops working

Token Refresh Issue

The plugin automatically refreshes OAuth tokens. If this fails:

  1. Check Blesta cron is running

    • Settings → Automation
    • Verify cron runs every 5 minutes
  2. Verify HTTPS certificate

    • Invalid certificates can prevent token refresh
    • Check certificate expiry
  3. Try reconnecting manually
    • Go to Settings
    • Click Disconnect from Xero
    • Click Connect to Xero again

Xero App Permissions Changed

  1. Log into developer.xero.com
  2. Check your app still has required scopes
  3. Verify organization access hasn't been revoked

"Invalid Client" Error

Cause: Client ID or Secret is incorrect

Solution:

  1. Double-check Client ID in Xero developer portal
  2. Generate a new Client Secret
  3. Update credentials in Xero Sync settings
  4. Try connecting again

"Access Denied" Error

Cause: Authorization was rejected

Solutions:

  1. Ensure you're signing into the correct Xero account
  2. Verify you have admin permissions in Xero
  3. Check the Xero organization allows third-party apps
  4. Try a different browser (clear cookies)

"Redirect URI Mismatch" Error

This is the most specific error message. Xero is telling you the URI doesn't match.

Exact steps to fix:

  1. In Blesta, go to Xero Sync → Settings
  2. Find "Callback URL" - copy it EXACTLY
  3. In Xero developer portal, go to your app
  4. Find "OAuth 2.0 redirect URIs"
  5. Delete any existing URIs
  6. Paste the exact URI from Blesta
  7. Save changes
  8. Try connecting again

Common mistakes:

  • https vs http
  • Trailing slash present/missing
  • Wrong domain (www vs non-www)
  • Port number differences
Please rate this article to help us improve our Knowledge Base.

0 0