> ## 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 Kustomer with OAuth 2.0 – StackOne Hub

> Link a Kustomer account in the StackOne Hub using OAuth 2.0. End-user guide to authorize the integration and start using Kustomer actions.

<Warning>You need a Kustomer API key with org.admin.apps and org.permission.apps roles to register an OAuth app.</Warning>

<section data-guide-section data-guide-scopes="">
  <h2>Register a Kustomer OAuth App</h2>

  <p>Register a private app with the Kustomer Apps Platform to obtain OAuth credentials.</p>

  <Steps>
    <Step title="Obtain an Admin API Key">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Go to your Kustomer instance at `https://<your-org>.kustomerapp.com`.</p>

        <ul>
          <li>Navigate to <strong>Settings > Security > API Keys</strong>.</li>
          <li>Click <strong>Add API Key</strong>.</li>
          <li>Assign the <strong>org.admin.apps</strong> and <strong>org.permission.apps</strong> roles.</li>
          <li>Copy the API key immediately — it is only shown once.</li>
        </ul>
      </div>
    </Step>

    <Step title="Register the App">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Use the API key to register your app via POST request to the Kustomer Apps Platform API.</p>

        <ul>
          <li>Send a POST request to `https://api.kustomerapp.com/v1/apps/available` with your app definition JSON.</li>
          <li>Include a unique app identifier and semantic version in the request body.</li>
          <li>Set the redirect URI to `https://api.stackone.com/connect/oauth2/kustomer/callback`.</li>
        </ul>
      </div>
    </Step>

    <Step title="Generate OAuth Credentials">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>After registering the app, generate the Client ID and Client Secret.</p>

        <ul>
          <li>Send a POST request to `https://api.kustomerapp.com/v1/apps/available/{app}/secret/` to generate credentials.</li>
          <li>Copy the <strong>Client ID</strong> and <strong>Client Secret</strong> — store them securely.</li>
        </ul>
      </div>
    </Step>
  </Steps>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Find Your Organization Name</h2>

  <p>Your Kustomer organization name is needed for the base URL.</p>

  <Steps>
    <Step title="Locate from your browser URL">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>After logging in to Kustomer, look at the URL in your browser address bar. It follows the format `https://<org-name>.kustomerapp.com`.</p>

        <ul>
          <li><strong>Organization Name</strong> is the subdomain before `.kustomerapp.com` (e.g., `mycompany`).</li>
        </ul>
      </div>
    </Step>
  </Steps>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Install the App</h2>

  <p>The OAuth app must be installed in the target organization before authorization can begin.</p>

  <Steps>
    <Step title="Install the App">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Install the registered app in the Kustomer organization. Without this step, the OAuth flow will return a 400 'Invalid Client' error.</p>
      </div>
    </Step>
  </Steps>
</section>

<div data-whitelabel-hide>
  <h2>Linking the Account from the Hub</h2>

  <Steps>
    <Step title="Navigate to the Hub">
      Use one of the three <a href="/guides/accounts-section#linking-accounts">Linking Account Methods</a> to access the Hub.
    </Step>

    <Step title="Fill out the fields">
      Fill out the following fields using details from your provider:

      <ul>
        <li><strong>Client ID</strong></li>
        <li><strong>Client Secret</strong></li>
        <li><strong>Organization Name</strong></li>
        <li><strong>Scopes</strong> (Optional)</li>
      </ul>
    </Step>

    <Step title="Connect">
      <ul>
        <li>Click <strong>Connect</strong></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>
    </Step>
  </Steps>

  <p>If the account linking is successful, you will see the newly linked account in your <a href="/guides/accounts-section">Accounts</a> page.</p>
</div>
