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

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

> [!WARNING]
>
> Only an Owner, Admin, IT admin or Network admin can generate an API access token. The token has the same permissions as the user who generates it, and Tailscale offers no scopes to narrow it, so it can also change users. The OAuth 2.0 option limits access with scopes. The IT admin role is available on the Standard, Premium and Enterprise plans.

## Generate the API access token

An API access token, sometimes called an API key, carries the permissions of the user who generates it.

**1. Sign in to Tailscale**

Sign in to your [Tailscale admin console](https://console.tailscale.com/admin) as an **IT admin**.

<ul>
  <li>**IT admin** is the smallest role that covers this connector. It reads users and the policy file and manages users, invitations and devices. It cannot change the policy file, DNS or billing.</li>
  <li>If your plan has no **IT admin** role, sign in as an **Admin**.</li>
  <li>Do not use a Network admin. Tailscale lets only an Owner, Admin or IT admin manage invitations, and the connection test lists pending invitations.</li>
  <li>Open the [Keys](https://console.tailscale.com/admin/settings/keys) page.</li>
</ul>

**2. Generate the token**

In the **API access tokens** section, select **Generate access token**.

<ul>
  <li>Choose the number of days before the token expires, from 1 to 90.</li>
  <li>When the token expires, the connection stops working until you paste a new token into StackOne Hub. Set a reminder to replace it before then.</li>
</ul>

**3. Copy the token**

Copy the token and store it securely for use later.

<ul>
  <li>Tailscale says secrets are only displayed once in their entirety. If you do not copy it, generate a new token.</li>
  <li>The token starts with `tskey-api` and is case-sensitive.</li>
  <li>Paste it into the **API Access Token** field in StackOne Hub.</li>
</ul>

## Revoke the token

To stop StackOne from reading your tailnet before the token expires, revoke it.

<ul>
  <li>Open the [Keys](https://console.tailscale.com/admin/settings/keys) page and go to the **API access tokens** section.</li>
  <li>Select **Revoke** next to the token.</li>
  <li>Recently expired and revoked tokens stay listed on the Keys page.</li>
</ul>

## Linking the Account from the Hub

**1. Navigate to the Hub**

Use one of the three [Linking Account Methods](https://docs.stackone.com/connect/managing-connectors/linking-accounts.md) to access the Hub.

**2. Fill out the fields**

Fill out the following fields using details from your provider:

<ul>
  <li>**API Access Token**</li>
</ul>

**3. 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>

If the account linking is successful, you will see the newly linked account on your [Accounts](https://app.stackone.com/accounts) page.


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