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

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

> [!WARNING]
>
> Creating and managing workspace API keys requires a Business or Enterprise plan and the owner or admin role in the workspace. On Free and Pro plans Lovable shows an upgrade prompt instead, and if the workspace later moves to one of those plans, the connection stops working. The account that creates the key must have a verified email, because Lovable refuses API calls until it is verified. A key belongs to one workspace, so create one key for each workspace you want StackOne to read and connect each one separately in StackOne Hub.

## Create the API key

A workspace API key (access token) lets StackOne read one workspace's members and groups. Give StackOne its own key so you can limit and revoke it on its own.

**1. Sign in to Lovable**

Sign in to your [Lovable account](https://lovable.dev/login) as an owner or admin of the workspace.

<ul>
  <li>Select the workspace you want StackOne to read, because the key belongs to the workspace that is selected.</li>
  <li>Go to [**Workspace settings** → **API keys & OAuth** → **Workspace access tokens**](https://lovable.dev/settings/api-keys).</li>
</ul>

**2. Start a new key**

Click **New API key**, then enter a **Key name** such as `StackOne Integration`.

<ul>
  <li>Workspace admins and owners can see the name.</li>
  <li>Lovable attributes actions made with the key to the person who creates it.</li>
</ul>

**3. Leave the credit limit blank**

Leave **Credit limit** blank for no limit.

<ul>
  <li>The limit caps the AI build credits the key can spend each month. StackOne only reads the workspace, which spends no credits.</li>
</ul>

**4. Choose an expiration**

Choose an **Expiration**: 7, 30, 60, 90, or 180 days, 1 year, or **Never**.

<ul>
  <li>Lovable recommends an expiry date over **Never**.</li>
  <li>When the key expires, requests fail and the connection stops working until you create a new key and paste it into StackOne Hub. Expired keys stay in the list.</li>
</ul>

**5. Grant access**

Under **Access**, set **Workspace** to **Read** and **Projects** to **None**.

<ul>
  <li>**Workspace: Read** lets the key list projects and read workspace details, members, groups, security insights and analytics. Every StackOne action needs only this access.</li>
  <li>Do not use **Apply preset → Full access**. It also grants write access to projects, including publishing and deleting them.</li>
  <li>**Apply preset → Read only** also works, but it sets **Projects** to **Read** too, which lets the key read each project's settings and security scans. StackOne does not need that.</li>
</ul>

**6. Limit the key to StackOne's IP addresses (optional)**

Leave **IP allowlist** empty to accept requests from any address. To accept only StackOne, click **Upload CSV** and choose a file with every one of [StackOne's IP addresses](https://docs.stackone.com/gateway/concepts/connector-profiles.md#connection-issues-behind-a-firewall), one address per row.

<ul>
  <li>A request from an address that is not on the list fails with `403 ip_restricted`, so a list that misses a StackOne address breaks the connection.</li>
  <li>StackOne may add or remove addresses. To update the list later, open the key's menu and click **Edit IP allowlist**.</li>
</ul>

**7. Create and copy the key**

Click **Create API key**, then copy the key value.

<ul>
  <li>Lovable says the secret value is shown only once, right after the key is created. If you lose it, create a new key.</li>
  <li>The key starts with `lov_`.</li>
  <li>Paste it into the **API Key** field in StackOne Hub.</li>
</ul>

## Revoke the key

To stop StackOne from reading the workspace, revoke the key.

<ul>
  <li>Go back to **Workspace access tokens** and open the key's menu.</li>
  <li>Click **Revoke key**, then confirm. Revocation is permanent and normally takes effect immediately, with a brief delay possible.</li>
  <li>To replace a key, create a new one, paste it into StackOne Hub, check that the connection works, then revoke the old one. A key's name, scopes and expiry cannot be changed after creation.</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 Key**</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.