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

# How to register your own Agiloft OAuth app

> Register an OAuth app with Agiloft and connect it to Nango

This guide shows you how to register your own app with Agiloft to obtain your OAuth credentials (client ID & secret). These are required to let your users grant your app access to their Agiloft account.

<Steps>
  <Step id="create-service-user" title="Create a service user account">
    Each OAuth client must be linked to a dedicated Agiloft user account. This account acts as a service user — all API calls made through the client run with its identity and permissions.

    When creating the service user account, keep in mind:

    * The account must be a **native** Agiloft account (LDAP accounts are not supported).
    * Each OAuth client must use a **different** account. Multiple clients sharing the same account will invalidate each other's tokens.
    * The account requires an **Admin** or **Standard** license.
    * Add the appropriate groups to the account to grant access to the records you plan to interact with via the API.

    Note the **Contact ID** for this account — you will need it when configuring the connection in Nango.
  </Step>

  <Step id="open-oauth-client-setup" title="Open the OAuth2 Client Setup">
    Log in to your Agiloft instance and go to **Setup > Integration > OAuth2 Client Setup**.

    Click **Deploy**, **Upgrade**, or **Configure** depending on what is shown:

    * **Deploy**: deploys the OAuth2 client for the first time (takes a few minutes).
    * **Upgrade**: upgrades an already-deployed client to the latest version.
    * **Configure**: takes you directly to the API Application screen.
  </Step>

  <Step id="create-api-application" title="Create a new API application">
    On the API Application screen, click **New** to open the OAuth2 Application Settings wizard.

    Fill in the required fields:

    * **Authorization Grant Type**: select **Authorization Code**.
    * **Name**: a unique name for the application used with the REST API.
    * **Display Name**: the name shown in your Agiloft KB.
    * **Full Name**: the name of the service user account created in step 1. The **Associate this Application with Contact ID** field will be populated automatically.
    * **Redirect URI**: enter `https://api.nango.dev/oauth/callback`.
    * **Token Expiry in Minutes**: leave at the default (15) or set a value between 1 and 60.

    Click **Apply Changes**.
  </Step>

  <Step id="enable-and-get-credentials" title="Enable the application and copy credentials">
    Click **Enable** to activate the application. This generates your **Client ID** and **Client Secret**.

    Copy both values — you will need them when configuring the integration in Nango.
  </Step>

  <Step id="configure-nango" title="Configure the integration in Nango">
    In Nango, when setting up the Agiloft integration, enter your **Client ID** and **Client Secret**.

    Set the **Scopes** field to `permissions_for:{contactId}`, replacing `{contactId}` with the Contact ID from the **Associate this Application with Contact ID** field in your Agiloft API application (e.g. `permissions_for:213`).

    Then follow the [quickstart](/getting-started/quickstart) to connect your first account.
  </Step>
</Steps>

For more details, see [Agiloft's OAuth 2.0 documentation](https://wiki.agiloft.com/display/HELP/Using+OAuth2+to+Access+REST+API).

***
