> ## 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 dbt with API Token – StackOne Hub

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

> [!WARNING]
>
> Creating a service token requires account admin access in dbt Cloud. If you are not an admin, ask an account admin to create the token and share it with you.

## Find your Access URL

Your dbt Cloud access host is the base URL where you reach the dbt platform and Admin API for your account. You can find it in your account settings.

**1. Copy your Access URL**

Sign in to your [dbt Cloud account](https://cloud.getdbt.com/), then open **Account settings**. Under **Account information** and **Access URLs**, find the **Access URL**.

<ul>
  <li>Copy the **Access URL** across to **Access URL Host** — use only the host, without the `https://` prefix or the trailing slash.</li>
  <li>Format: `{account_prefix}.{region}.dbt.com`</li>
  <li>Example: if your **Access URL** is `https://mp715.us1.dbt.com/`, your **Access URL Host** is `mp715.us1.dbt.com`.</li>
</ul>

![Account settings page showing the Access URL under Account information](https://mintcdn.com/stackone-60/b-kek3oGp-0IggYl/connectors/dbt/images/api_token-config-access-url.png?fit=max\&auto=format\&n=b-kek3oGp-0IggYl\&q=85\&s=00412992deff7a30586f6ca8d275a5ac)

## Create a service token

StackOne authenticates to the dbt Cloud Admin API with a service token. Create one in your account settings, then copy its value across.

**1. Open the Service tokens page**

In **Account settings**, open **API tokens → Service tokens**, then click **+ Create service token**.

![Service tokens page with the Create service token button](https://mintcdn.com/stackone-60/b-kek3oGp-0IggYl/connectors/dbt/images/api_token-config-service-tokens.png?fit=max\&auto=format\&n=b-kek3oGp-0IggYl\&q=85\&s=ac61d87b47813c45dd47aab71b020e63)

**2. Name the token and set its permissions**

In the **New service token** drawer, configure the token:

<ul>
  <li>**Token name**: a name you will recognize, for example `StackOne Integration`.</li>
  <li>**Expiry**: keep **No expiry**, or pick an expiry date that fits your security policy.</li>
  <li>Click **Add permission**.</li>
  <li>**Permission set**: choose **Account Admin** for full access to projects, environments, jobs, and runs, or a narrower set such as **Job Admin** for job and run access only.</li>
</ul>

![New service token drawer with token name, expiry, and an Account Admin permission set](https://mintcdn.com/stackone-60/b-kek3oGp-0IggYl/connectors/dbt/images/api_token-config-new-token.png?fit=max\&auto=format\&n=b-kek3oGp-0IggYl\&q=85\&s=b580432cb6be1e25a47f467d0fac1321)

**3. Copy the token**

Click **Save**. dbt Cloud shows **Success! Be sure to copy your new token before closing.** Click **Copy**, then copy the **API Token** across.

<ul>
  <li>The service token is only displayed once and cannot be retrieved later, so copy it before closing the drawer.</li>
</ul>

![Generated service token with the Copy button and a copy-before-closing message](https://mintcdn.com/stackone-60/b-kek3oGp-0IggYl/connectors/dbt/images/api_token-config-copy-token.png?fit=max\&auto=format\&n=b-kek3oGp-0IggYl\&q=85\&s=98e84dce24f9da419f9b69c1d76c7763)

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