# Xero

Go to <https://developer.xero.com/app/manage> and create a new app. Fill the application name and redirect URL (<https://api.appmixer.com/auth/xero/callback>).

<figure><img src="https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-1672701aae9f10d2807c2fecfbddc65f91b72e64%2Fxero-1.png?alt=media" alt=""><figcaption></figcaption></figure>

Get you *client ID* and *clientSecret* in the "Configuration" section

<figure><img src="https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-18c537583ad54419c416215bcd61532097958e5b%2Fxero-2.png?alt=media" alt=""><figcaption></figcaption></figure>

Go to the Appmixer BackOffice -> Configuration. Add new configuration: `appmixer:xero` . Add your `clientId` and `clientSecret` keys.

<figure><img src="https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-d2aad1845fe0af69a33b41bb05902ab6f52667ac%2Fxero-3.png?alt=media" alt=""><figcaption></figcaption></figure>

## Webhooks

All trigger components (for example `NewInvoice`) use Xero webhooks. In order to use this component(s) in Appmixer, you have to register Appmixer's Xero URI in Xero first.

Go to [https://developer.xero.com/myapps](https://developer.xero.com/app) then choose your Appmixer app. Navigate to the "Webhooks" section and add a new webhook.

<figure><img src="https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-2336922e966695a8a4f80aa78e2b5750ac0a3e58%2Fxero-4.png?alt=media" alt=""><figcaption><p>Xero Webhooks configuration</p></figcaption></figure>

Fill the field **Send notifications to** with `https://api.acme.appmixer.cloud/plugins/xero/webhooks` (replace `acme` with your subdomain) and select the events you want to listen to.

For detailed steps, see [Xero documentation](https://developer.xero.com/documentation/guides/webhooks/creating-webhooks/).

Make sure to copy the **Webhooks key** and paste it to the Appmixer BackOffice -> Configuration -> `appmixer:xero` -> `webhookKey` field.

<figure><img src="https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-3e3f1978fba1582eefb176a9989e57179a66f78d%2Fxero-5.png?alt=media" alt=""><figcaption><p>Appmixer BackOffice configuration for Xero Webhooks</p></figcaption></figure>
