> ## 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 Harness with API Key – StackOne Hub

> Link a Harness account in the StackOne Hub using API Key. End-user guide to authorize the integration and start using Harness actions.

<Warning>The token value is shown only once at creation and cannot be retrieved later — copy and store it securely. The token carries the permissions of the user who creates it, so use an account with the access your integration needs.</Warning>

<section data-guide-section data-guide-scopes="">
  <h2>Generate a Harness API key token</h2>

  <p>Create a personal API key and token in Harness. The token is the <strong>API Key</strong> value StackOne needs.</p>

  <Steps>
    <Step title="Sign in to Harness">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Sign in on the <a href="https://app.harness.io" target="_blank" rel="noopener noreferrer">Harness sign-in page</a> with your <strong>Email</strong> and <strong>Password</strong>, then click <strong>Sign in</strong>.</p>

        <img src="https://mintcdn.com/stackone-60/z1f68Vshj_J7cwjE/connectors/harness/images/custom-config-sign-in.png?fit=max&auto=format&n=z1f68Vshj_J7cwjE&q=85&s=400ce886fec4013ebfa6b5c6630efe12" alt="Harness sign-in page with the Sign in button highlighted" width="1280" height="800" data-path="connectors/harness/images/custom-config-sign-in.png" />
      </div>
    </Step>

    <Step title="Open your Profile Overview">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Click your profile icon in the bottom-left corner of the navigation, then click <strong>Profile Overview</strong> in the menu that opens.</p>

        <img src="https://mintcdn.com/stackone-60/z1f68Vshj_J7cwjE/connectors/harness/images/custom-config-profile-overview.png?fit=max&auto=format&n=z1f68Vshj_J7cwjE&q=85&s=13e1c6aa521c2f219fc74f60bb71e27c" alt="Profile menu open with Profile Overview highlighted" width="1280" height="800" data-path="connectors/harness/images/custom-config-profile-overview.png" />
      </div>
    </Step>

    <Step title="Create a new API key">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>On your Profile Overview page, find the <strong>My API Keys</strong> section and click <strong>+ API Key</strong>.</p>

        <ul>
          <li>In the <strong>New API Key</strong> dialog, enter a <strong>Name</strong> for the key.</li>
          <li>Click <strong>Save</strong>.</li>
        </ul>

        <img src="https://mintcdn.com/stackone-60/z1f68Vshj_J7cwjE/connectors/harness/images/custom-config-new-api-key.png?fit=max&auto=format&n=z1f68Vshj_J7cwjE&q=85&s=2c3e23bd7153311985cdc6a76c4c4928" alt="My API Keys section with the + API Key button highlighted" width="1280" height="800" data-path="connectors/harness/images/custom-config-new-api-key.png" />
      </div>
    </Step>

    <Step title="Generate a token">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Click <strong>+ Token</strong> under the API key you just created.</p>

        <ul>
          <li>In the <strong>New Token</strong> dialog, enter a <strong>Name</strong> for the token.</li>
          <li>Set the <strong>Expiration</strong> — the dialog shows the exact date the token will expire.</li>
          <li>Click <strong>Generate Token</strong>.</li>
        </ul>

        <img src="https://mintcdn.com/stackone-60/z1f68Vshj_J7cwjE/connectors/harness/images/custom-config-generate-token.png?fit=max&auto=format&n=z1f68Vshj_J7cwjE&q=85&s=6d956cde298db706244c973edf323184" alt="Newly created API key with the + Token button highlighted" width="1280" height="800" data-path="connectors/harness/images/custom-config-generate-token.png" />
      </div>
    </Step>

    <Step title="Copy the token value">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>The token <strong>Value</strong> is displayed once — "Your new token has been generated. Please make sure to copy and store your token value somewhere safe, you won't be able to see it again."</p>

        <ul>
          <li>Copy the token value — it starts with `pat.` (for example `pat.xxxx.xxxx.xxxx`) — and paste it into the <strong>API Key</strong> field in StackOne Hub.</li>
          <li>The token value is shown only once and cannot be retrieved later.</li>
          <li>Click <strong>Close</strong>.</li>
        </ul>

        <img src="https://mintcdn.com/stackone-60/z1f68Vshj_J7cwjE/connectors/harness/images/custom-config-token-value.png?fit=max&auto=format&n=z1f68Vshj_J7cwjE&q=85&s=3f25bd3e9ebaa5b79a756b0bedf77a24" alt="New Token dialog showing the generated token with the Value field and Close button highlighted" width="1280" height="800" data-path="connectors/harness/images/custom-config-token-value.png" />
      </div>
    </Step>
  </Steps>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Find your account identifier</h2>

  <p>Your <strong>Account Id</strong> uniquely identifies your Harness account — StackOne needs it as the<br /><strong>Account Identifier</strong>.</p>

  <Steps>
    <Step title="Open Account Settings">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Click <strong>Account Settings</strong> in the left navigation.</p>

        <img src="https://mintcdn.com/stackone-60/z1f68Vshj_J7cwjE/connectors/harness/images/custom-config-account-settings.png?fit=max&auto=format&n=z1f68Vshj_J7cwjE&q=85&s=33d38debf7c4c4fe9d433535ccef8fcb" alt="Left navigation with Account Settings highlighted" width="1280" height="800" data-path="connectors/harness/images/custom-config-account-settings.png" />
      </div>
    </Step>

    <Step title="Open Account Details">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>On the <strong>Account Settings</strong> page, under <strong>General</strong>, click <strong>Account Details</strong>.</p>

        <img src="https://mintcdn.com/stackone-60/z1f68Vshj_J7cwjE/connectors/harness/images/custom-config-account-details.png?fit=max&auto=format&n=z1f68Vshj_J7cwjE&q=85&s=63b24a9faf57bd3e1a64d157f9037604" alt="Account Settings page with the Account Details tile highlighted under General" width="1280" height="800" data-path="connectors/harness/images/custom-config-account-details.png" />
      </div>
    </Step>

    <Step title="Copy the Account Id">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>On the <strong>Account Overview</strong> page, copy the <strong>Account Id</strong> value and paste it into the<br /><strong>Account Identifier</strong> field in StackOne Hub.</p>

        <ul>
          <li>Example: `Abc123XyzQRstUVwx456yz`</li>
          <li>Alternatively, copy it from your browser URL after /account/ (e.g. `app.harness.io/ng/account/YOUR_ACCOUNT_ID/...`).</li>
        </ul>

        <img src="https://mintcdn.com/stackone-60/z1f68Vshj_J7cwjE/connectors/harness/images/custom-config-account-id.png?fit=max&auto=format&n=z1f68Vshj_J7cwjE&q=85&s=7af10beb82d7838151884dd91ed3c594" alt="Account Overview page with the Account Id value highlighted" width="1280" height="800" data-path="connectors/harness/images/custom-config-account-id.png" />
      </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>API Key</strong></li>
        <li><strong>Account Identifier</strong></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>
