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.
- Go to Settings in the Xero Sync plugin
- Copy the Callback URL exactly as shown
- Log into developer.xero.com
- Open your app settings
- 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
- Confirm Client ID is correct (no extra spaces)
- Try regenerating the Client Secret in Xero
- Copy and paste carefully - secrets are long
Check Xero App Status
- Log into developer.xero.com
- Go to My Apps
- Verify your app is not deleted or disabled
- 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:
-
Check Blesta cron is running
- Settings → Automation
- Verify cron runs every 5 minutes
-
Verify HTTPS certificate
- Invalid certificates can prevent token refresh
- Check certificate expiry
- Try reconnecting manually
- Go to Settings
- Click Disconnect from Xero
- Click Connect to Xero again
Xero App Permissions Changed
- Log into developer.xero.com
- Check your app still has required scopes
- Verify organization access hasn't been revoked
"Invalid Client" Error
Cause: Client ID or Secret is incorrect
Solution:
- Double-check Client ID in Xero developer portal
- Generate a new Client Secret
- Update credentials in Xero Sync settings
- Try connecting again
"Access Denied" Error
Cause: Authorization was rejected
Solutions:
- Ensure you're signing into the correct Xero account
- Verify you have admin permissions in Xero
- Check the Xero organization allows third-party apps
- 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:
- In Blesta, go to Xero Sync → Settings
- Find "Callback URL" - copy it EXACTLY
- In Xero developer portal, go to your app
- Find "OAuth 2.0 redirect URIs"
- Delete any existing URIs
- Paste the exact URI from Blesta
- Save changes
- Try connecting again
Common mistakes:
https vs http
- Trailing slash present/missing
- Wrong domain (www vs non-www)
- Port number differences