> ## Documentation Index
> Fetch the complete documentation index at: https://docs.watchdog.no/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Xledger to Watchdog

> Connect Xledger to Watchdog and grant access to invoices and documents.

Connect Xledger to Watchdog with an API token that provides read access to invoices and documents.

## Before you begin

Ask an Xledger **Domain Administrator** to create the token with the permissions described below.

## Connect in Watchdog

1. Open **Integrations → Xledger** and add a connection.
2. Paste the API token.
3. Select **Test Connection**, then save the connection.
4. Optionally select suppliers under **Settings**.

## For the Xledger administrator

1. Sign in with the **Domain Administrator** role.
2. Open [API Token Management](https://www.xledger.net/f/api-tokens), also available under **Administration → System Access → GraphQL → API tokens**.
3. Create a token with a recognizable name, such as “Watchdog”.
4. Select **Read** for **Accounts Payable**, **General Ledger**, and **Common**.
5. Generate the token and copy it into Watchdog.

Grant read access; Watchdog does not need write access. Keep the token secure.

See [Xledger's API-token guide](https://xledgerukinternal.zendesk.com/hc/en-us/articles/23682919258514-Generate-an-API-token).

## If the connection does not work

Check that the token belongs to the production environment and has the required read permissions. A token from Xledger's demo environment cannot be used with the production environment Watchdog connects to.
