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

# Connect Affinity with OAuth 2.0 (Multiple Companies) – StackOne Hub

> Link a Affinity account in the StackOne Hub using OAuth 2.0 (Multiple Companies). End-user guide to authorize the integration and start using Affinity actions.

> [!WARNING]
>
> OAuth apps are in early access in Affinity and can only be created by an admin of your Affinity organization.

## Create an Affinity OAuth app

Register a Confidential OAuth app in your own Affinity organization, then sign in with an Affinity user of that organization.

**1. Create the OAuth app**

Sign in to Affinity as an admin and open **Settings** > **Manage Apps**, then create a new **Confidential** OAuth app. The app lives in your own Affinity organization, and only its users can authorize it.

<ul>
  <li>**Redirect URI**: the **Callback URL** StackOne shows you when you connect</li>
</ul>

**2. Copy the credentials**

Copy the **Client ID** and **Client Secret** of the app across. The Client Secret is shown once and cannot be viewed again.

## Link the Account

**1. Connect**

<ul>
  <li>Click **Connect**.</li>
  <li>If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider's authorization flow.</li>
  <li>Once authorization is successful, you will see a confirmation popup.</li>
</ul>

**2. Use Actions**

Connect an AI platform to the linked account's actions. See [AI Platforms](https://docs.stackone.com/ai-platforms/overview.md).

Other ways to call actions are listed in [Protocols & SDKs](https://docs.stackone.com/connect/protocols-and-sdks.md).


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