> ## 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 Jenkins with API Token (Multiple Companies) – StackOne Hub

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

> [!WARNING]
>
> Use a Jenkins account with the permissions the actions need, because StackOne acts with that user's own permissions. Reading other users' full account details and creating users need the Administer permission, putting Jenkins into quiet-down or restarting it needs the Manage permission, and role actions need the Role-based Authorization Strategy plugin.

## Find your Jenkins URL

Your Jenkins URL is the address you open your Jenkins controller at.

<ul>
  <li>Check your browser address bar while signed in to Jenkins.</li>
  <li>Format: `https://{jenkins-host}`</li>
  <li>Example: `https://jenkins.example.com`</li>
  <li>Leave off any trailing slash.</li>
  <li>Paste it into the **Jenkins URL** field in StackOne Hub.</li>
</ul>

## Find your username

Your username is the Jenkins user ID that the API token belongs to.

**1. Open your user page**

Sign in to Jenkins with the account StackOne will use, then click your user icon in the top right corner of any page.

![Jenkins dashboard with the user icon in the top right corner highlighted](https://mintcdn.com/stackone-60/wCgH43op2c8xMkFb/connectors/jenkins/images/custom-config-user-icon.png?fit=max\&auto=format\&n=wCgH43op2c8xMkFb\&q=85\&s=dd85f6980fc6ea885539c6f1a6a93477)

**2. Copy your username**

Your user page shows your user ID next to **Username:**.

<ul>
  <li>Paste it into the **Username** field in StackOne Hub.</li>
</ul>

![Jenkins user page with the Username value and the Security link highlighted](https://mintcdn.com/stackone-60/wCgH43op2c8xMkFb/connectors/jenkins/images/custom-config-username.png?fit=max\&auto=format\&n=wCgH43op2c8xMkFb\&q=85\&s=cbe4c9ba2f516ec164b518c833bec740)

## Generating an API token

An API token authenticates StackOne to Jenkins as your user, in place of your password.

**1. Add a new token**

On your user page, click **Security** in the sidebar. Under **API Token**, click **Add new token**.

<ul>
  <li>Shortcut: `{your Jenkins URL}/me/security`</li>
</ul>

![Jenkins Security page with the Add new token button highlighted under API Token](https://mintcdn.com/stackone-60/wCgH43op2c8xMkFb/connectors/jenkins/images/custom-config-add-new-token.png?fit=max\&auto=format\&n=wCgH43op2c8xMkFb\&q=85\&s=202889d156409491540582999103bd7f)

**2. Name and generate the token**

In **Create new API token**, enter `StackOne Integration` as the **Name**, choose an **Expiration**, and click **Generate**.

<ul>
  <li>The default **Expiration** is **30 Days**. When the token expires, the StackOne connection stops working until you add a new token.</li>
  <li>Choose a longer period, or **No Expiration** if your security policy allows it.</li>
</ul>

![Create new API token dialog with the Name field, Expiration list and Generate button highlighted](https://mintcdn.com/stackone-60/wCgH43op2c8xMkFb/connectors/jenkins/images/custom-config-create-token.png?fit=max\&auto=format\&n=wCgH43op2c8xMkFb\&q=85\&s=a593a09e6b385afe4033a43415b0451a)

**3. Copy the token**

Click **Copy token** and store it securely for use later, then click **Done**.

<ul>
  <li>Jenkins shows the token only once and it cannot be retrieved later. The dialog says "Copy this token now, because it cannot be recovered in the future."</li>
  <li>Paste it into the **API Token** field in StackOne Hub.</li>
</ul>

![New API token dialog with the token value hidden and the Copy token button highlighted](https://mintcdn.com/stackone-60/wCgH43op2c8xMkFb/connectors/jenkins/images/custom-config-copy-token.png?fit=max\&auto=format\&n=wCgH43op2c8xMkFb\&q=85\&s=a5fa73132ca11242da39527a09e168c0)

## 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/jenkins/guides/webhook-setup.md)
>
> Configure receiving Events for Jenkins into StackOne.


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