> ## 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.

# Factorial OAuth 2.0 connector profile – StackOne setup guide

> Set up a connector profile using OAuth 2.0 for Factorial in StackOne to allow users to link their accounts.

> [!WARNING]
>
> Admin privileges in your Factorial HR account are required to create OAuth applications.

## Creating an OAuth Application

To enable OAuth 2.0 authentication with StackOne, you need to create an OAuth application in Factorial.

**1. Access the OAuth Applications Page**

Navigate to your OAuth applications page based on your environment.

<ul>
  <li>Production: [api.factorialhr.com/oauth/applications](https://api.factorialhr.com/oauth/applications)</li>
  <li>Sandbox: [api.eu2.demo.factorial.dev/oauth/applications](https://api.eu2.demo.factorial.dev/oauth/applications)</li>
</ul>

**2. Create a New Application**

Click **New Application** to start the OAuth application creation process.

**3. Configure Application Details**

Enter the required application details.

<ul>
  <li>**Name**: Enter a descriptive name (e.g., `StackOne Integration`)</li>
  <li>**Redirect URI**: the **Callback URL** from your Connector Profile</li>
  <li>**Confidential**: Select based on your security requirements</li>
</ul>

**4. Configure Scopes**

Select the OAuth scopes your application needs access to. Available scopes include employees, contracts, time\_off, recruitment, and more.

<ul>
  <li>Select only the scopes required for your integration</li>
  <li>See [OAuth Scopes documentation](https://apidoc.factorialhr.com/docs/oauth-scopes) for full details</li>
</ul>

**5. Save and Copy Credentials**

Click **Submit** to save the application. Your credentials will be displayed.

<ul>
  <li>Copy the **Client ID** and **Client Secret** and store them securely</li>
  <li>The Client Secret is only shown once at creation and cannot be retrieved later</li>
  <li>The Client ID can be found on the application details page anytime</li>
</ul>

## Token Types

Factorial supports two token types for OAuth authentication.

**1. User Token**

User tokens make requests on behalf of a specific user. The user must be an employee in Factorial with appropriate permissions.

<ul>
  <li>Expires in 1 hour</li>
  <li>Requires token refresh</li>
  <li>Actions are scoped to the user's permissions</li>
</ul>

**2. Company Token**

Company tokens make requests on behalf of the company. Recommended for integrations that need company-wide access.

<ul>
  <li>Never expires (but can be revoked)</li>
  <li>No refresh needed</li>
  <li>Full company-level access</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/factorialhr/guides/link-account/oauth-2-0.md).


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