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

# AFAS Software OAuth 2.0 Connector Profile

> Set up the AFAS Software connector profile for OAuth 2.0 in StackOne so users can link their accounts.

> [!WARNING]
>
> Creating an app connector requires access to General / Management / App connector in AFAS Profit.

## Find your environment ID

Your environment ID identifies your AFAS environment and appears in the web address you use to reach it.

<ul>
  <li>Format: `https://{environmentId}.rest.afas.online`</li>
  <li>Example: if your AFAS address is `https://12345.rest.afas.online`, your environment ID is `12345`.</li>
</ul>

## Create the app connector

In AFAS Profit, go to **Algemeen / Beheer / App connector** and add a new app connector.

**1. Set up OAuth authentication**

Set the app connector's **Authenticatietype** to OAuth.

<ul>
  <li>**Omschrijving**: `StackOne Integration`</li>
  <li>**Type OAuth flow**: **Code**</li>
</ul>

**2. Set the redirect URL**

In the **Redirect url** field, enter the **Callback URL** from your Connector Profile.

**3. Link the connectors**

Under **GetConnectoren koppeling** and **UpdateConnectoren koppeling**, click **Nieuw** and add every GetConnector and UpdateConnector this integration needs.

**4. Copy credentials**

Copy the **OAuth client id** and **OAuth client secret** into your Connector Profile.

<ul>
  <li>The **OAuth client secret** is only displayed once and cannot be retrieved later.</li>
</ul>

## Create the StackOne Connector Profile

**1. Create a Connector Profile**

Enable the connector and create a Connector Profile in your project. See [Setup Connector Profile](https://docs.stackone.com/gateway/quickstart.md#setup-connector-profile).

**2. Link an Account**

Once the Connector Profile is created, continue to [link an account](https://docs.stackone.com/connectors/afas/guides/link-account/oauth-2-0.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.