# 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://content.gitbook.com/content/cfhstxIZQWZNvWjV2O6F/blobs/a3CUqYuDXmRZacO6JQmp/xero-1.png" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://content.gitbook.com/content/cfhstxIZQWZNvWjV2O6F/blobs/HQ7U36IO5eG3znVkaRgv/xero-2.png" 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://content.gitbook.com/content/cfhstxIZQWZNvWjV2O6F/blobs/gIWYfaoDk0JWjq79pfx1/xero-3.png" 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://content.gitbook.com/content/cfhstxIZQWZNvWjV2O6F/blobs/sCzHPI6RmwYbLi5Az7tS/xero-4.png" 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://content.gitbook.com/content/cfhstxIZQWZNvWjV2O6F/blobs/5kOeHqSIn517sPk2JR1e/xero-5.png" alt=""><figcaption><p>Appmixer BackOffice configuration for Xero Webhooks</p></figcaption></figure>
