> ## 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 Docker with OAuth 2.0 (Client Credentials) – StackOne Hub

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

## Create the organization access token

An organization access token belongs to your Docker organization, not to a person, so it keeps working when people join or leave the organization. Organization access tokens need a Docker Team or Docker Business subscription. Create one as an organization owner, a company owner, or with a custom role that has the **Manage organization access tokens** permission.

**1. Open the token form**

Sign in to [Docker Home](https://app.docker.com/) and create the token.

<ul>
  <li>Select your organization.</li>
  <li>Select **Identity & auth** > **Access tokens**.</li>
  <li>Select **Generate access token**.</li>
  <li>**Label**: a name that says what the token is for</li>
  <li>**Expiration date**: **None**, or a date before which you will renew the connection</li>
</ul>

**2. Choose the scopes**

In **Resources**, expand **Organization** and select the scopes below.

<ul>
  <li>**Member Read**</li>
  <li>**Invite Read**</li>
  <li>**Group Read**</li>
</ul>

**3. Add more organization scopes (optional)**

Under **Organization**, you can also select any of these scopes.

<ul>
  <li>**Member Edit**</li>
  <li>**Invite Edit**</li>
  <li>**Group Edit**</li>
  <li>**Audit Log Read**</li>
  <li>**Repository List**</li>
  <li>**Repository Create**</li>
</ul>

**4. Add repository access (optional)**

Expand **Repository** to give the token access to repositories.

<ul>
  <li>Select **Add repository**.</li>
  <li>Choose a repository, or **All `<organization>` repositories**.</li>
</ul>

**5. Choose repository scopes (optional)**

For the repositories you added, you can select any of these scopes.

<ul>
  <li>**Repository Read**</li>
  <li>**Tag Read**</li>
  <li>**Repository Settings Admin**</li>
  <li>**Repository Group Edit**</li>
</ul>

**6. Create the token**

When the scopes are set, create the token.

<ul>
  <li>Select **Generate token**.</li>
</ul>

**7. Copy the token**

Docker shows the token only once.

<ul>
  <li>Copy the **Organization Access Token** across.</li>
</ul>

## Find the organization namespace

The organization namespace is the permanent identifier of your organization. It is not the display name, which can change.

**1. Copy the namespace**

The namespace is the first part of every image name your organization pushes, as in `namespace/image:tag`.

<ul>
  <li>Format: `namespace/image:tag`</li>
  <li>Example: if an image is `acmecorp/api:1.4`, your **Organization Namespace** is `acmecorp`</li>
  <li>Copy the **Organization Namespace** across.</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).


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