Skip to content
NodeJS app for demonstrating the xero-node v4 SDK
TypeScript CSS HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Xero NodeJS OAuth 2.0 App

This NodeJS project demonstrates how to use the xero-node SDK.

Note: this project was built using Visual Studio Code and NodeJS v10.

How to use

Configure with your credentials

Create an OAuth 2.0 app in Xero to get a XERO_CLIENT_ID and XERO_CLIENT_SECRET.

  • Create a free Xero user account (if you don't have one)
  • Login to Xero Developer center
  • Click "Try OAuth 2.0"
  • Enter your app details (your redirect URI is http://localhost:5000)
  • Click "Create App"
  • Copy your client id and redirect URI into lib/app.ts
const client_id = '_YOUR_CLIENT_ID';
const redirectUrl = 'http://localhost:5000/callback';
  • Click "Generate a secret"
  • Copy your secret into lib/app.ts
const client_secret = '_YOUR_CLIENT_SECRET'

Build and run

npm install
npm run prod
You can’t perform that action at this time.