Authentication
The authentication properties specify the details that must be used to authenticate a user against a specific Xero application.
Prerequisites:
- You have registered an account on Xero
- You have created an App on Xero's applications portal:
- for apps created after December 2019, OAuth2 is used for authentication
- for apps created before December 2019, OAuth1 was used for authentication
Important:
Connecting to Xero apps using OAuth2
In Linx, for any function that connects to a Xero app that uses OAuth2, provide your Xero app's authentication details in the function's Authentication properties:
- Type:
Select 'OAuth2' from the drop-down. - OAuth2 authentication: Create the following values on this Xero Token Generator:
- TenantId:
Tenants are the organisations (small businesses) or practices (accounting firms) to which a user belongs and which they can access. The TenantID will be provided by Xero when setting up your App. - RefreshToken:
The token that is used to refresh the access token once it has expired. Provided by Xero during the authentication step. - ClientId:
Your unique client identifier. From your App on Xero. - ClientSecret:
The secret credentials that will be used to authenticate your connection. From your App on Xero.
-
Note:
For the Xero Token Generator to create your Refresh Token, your Xero app's OAuth2 redirect URI must be https://xerotokengenerator.z16.web.core.windows.net/
Get these values from the Xero portal, created when you registered your Xero app:
Connecting to Xero apps using OAuth1
Note:
- This section is only relevant to Xero apps created before December 2019.
- Xero apps using OAuth1 are expected to work until end of 2020.
Get these from the Xero portal, created when you registered your Xero app:
- CertificatePath
- CertificatePassword
- ConsumerKey
- ConsumerSecret
While setting up the private application, make sure you save the following elements, as you will need them to set the authentication values:
- Public certificate file in PFX format.
- The password to the public certificate.
- ConsumerKey provided by the Xero API configuration.
- ConsumerSecret provided by the Xero API configuration.
Authentication properties
- Type:
Select 'OAuth1' from the drop-down. - Authentication:
- CertificatePath: this is the path to the location of the public certificate in PFX format on your harddrive.
- CertificatePassword: this is the password to the public certificate provided in CertificatePath.
- ConsumerKey: Consumer Key credentials for your private application provided by Xero.
- ConsumerSecret: Consumer Secret credentials for your private application provided by Xero.
Links
Xero documentation on OAuth / OAuth2 changes
Xero documentation on OAuth / OAuth2 flows