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

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

> [!WARNING]
>
> You need a G2 Developer Portal account. If your organization already has one, ask your G2 admin to add you rather than creating a second organization.

## Generating an API token

G2 issues API tokens from the G2 Developer Portal. The token carries only the endpoint permissions you select while generating it, so set them before you generate.

**1. Create your Developer Portal account**

Sign in at the [G2 Developer Portal](https://my.g2.com/developers), or select **Create an account** if you do not have one. Skip this step if you can already reach the portal.

<ul>
  <li>Verify your email address.</li>
  <li>**Organization Name**: your company name</li>
  <li>**Organization Slug**: a unique short name for your organization</li>
  <li>The slug becomes part of your portal address, so use it to sign in from then on.</li>
  <li>If the slug is already taken, your organization has a portal already. Ask your G2 admin to add you instead.</li>
</ul>

**2. Generate the token**

Navigate to the **Access Tokens** tab, then select **Generate Token**.

<ul>
  <li>**Name**: `StackOne Integration`</li>
  <li>**Description**: optional</li>
  <li>**Resource Owner**: select **Organization** for a token shared by your whole organization, or **User** for a personal token</li>
  <li>In the *Permissions* panel, use the **Access** dropdown for each endpoint to select the access level.</li>
  <li>Endpoints without a selection are not accessible with the token, so select every endpoint the integration needs.</li>
  <li>Select **Generate Token** to add the token to the *API Tokens* panel.</li>
</ul>

**3. Copy the token**

In the *API Tokens* panel, select the **Eye** to reveal the token, then copy the **API Token** across.

<ul>
  <li>Select **Details** at any time to review the permissions assigned to the token.</li>
  <li>Access tokens expire one year after creation and must be regenerated to keep the connection working.</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.