Private Applications


Overview

Private applications use 2 legged OAuth and bypass the user authorization workflow in the standard OAuth process. Private applications are linked to a single Xero organisation which is chosen when you register your application. Access tokens for private applications don’t expire unless the application is deleted or disconnected from within the Xero organisation.

You can create a maximum of 2 private applications against a single Xero organisation.


Technical details

Private applications use the RSA-SHA1 signature method. You will need to generate a public/private key-pair, of which the public part will be uploaded to Xero during application registration.

Once you have added a private app you will be given a consumer key to use. The consumer key is also used as the access token. The consumer secret is not used for private apps.

How to setup a Private application.

  1. Generate a public/private key-pair for use with your application.
  2. Login to the Xero Developer portal which is located at https://api.xero.com
  3. Go to the My Applications > Add Application screen in the Xero Developer portal to add your application.
  4. Select “Private” and enter a name for your application
  5. Choose your organisation from the drop down list
  6. Upload the public certificate (.cer file) you generated in step one.
  7. Choose save. You will now have a Consumer Key to use for your application.

We recommend using a wrapper library to interact with the Xero API.