> ## 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 SonarQube Cloud with Personal Access Token (Bearer) (Multiple Companies) – StackOne Hub

> Link a SonarQube Cloud account in the StackOne Hub using Personal Access Token (Bearer) (Multiple Companies). End-user guide to authorize the integration and start using SonarQube Cloud actions.

> [!WARNING]
>
> **Personal Access Tokens expire 60 days after their last use**, so generate a new one if the account stops syncing for that long. The token carries every permission of the user who creates it, so create it from a dedicated user that is an admin of the organization.

## Generate a Personal Access Token

Personal Access Tokens are managed from the **Access Tokens** page of your SonarQube Cloud account.

**1. Generate the token**

Sign in to [SonarQube Cloud](https://sonarcloud.io), or to [SonarQube Cloud US](https://sonarqube.us) for the US region.

<ul>
  <li>From your avatar menu, open **My account > Access Tokens**.</li>
  <li>If you see tabs, select **Personal Tokens**.</li>
  <li>**Name**: under **Generate Tokens**, a label that tells you what the token is for.</li>
  <li>Click **Generate Token**.</li>
</ul>

**2. Copy the token**

Copy the token value right away. SonarQube Cloud shows it only once.

## Find your Organization Key

Copy the organization key from your SonarQube Cloud workspace URL.

**1. Copy the organization key**

The organization key is the part of your workspace URL after `/organizations/`.

<ul>
  <li>Format: `https://sonarcloud.io/organizations/{organization-key}`</li>
  <li>Example: in `https://sonarcloud.io/organizations/acme-corp`, the organization key is `acme-corp`.</li>
</ul>

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

## Next Steps

> [card] [Webhooks setup](https://docs.stackone.com/connectors/sonarcloud/guides/webhook-setup.md)
>
> Configure receiving Events for SonarQube Cloud into StackOne.


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