> ## 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 Ansible with API Token (Multiple Companies)

> Link your Ansible account in the StackOne Hub with API Token (Multiple Companies), then use its actions in StackOne.

> [!WARNING]
>
> Users who sign in through an external authentication provider, such as LDAP, SAML or SSO, can only create tokens after a platform administrator sets Allow External Users to Create OAuth2 Tokens to Enabled under Settings > Platform gateway.

## Find your platform host

The platform host is the address you open Ansible Automation Platform at.

**1. Copy the platform host**

Open Ansible Automation Platform and copy the host from your browser's address bar across.

<ul>
  <li>Format: `{host}`, without `https://` or a path</li>
  <li>Example: if your URL starts with `https://aap.example.com/`, your **Platform Host** is `aap.example.com`</li>
</ul>

## Creating an API token

A token carries the permissions of the user who creates it.

**1. Create the token**

In the Ansible Automation Platform navigation panel, select **Access Management** > **API Tokens**.

<ul>
  <li>Click **Create API token**.</li>
  <li>**Description**: `StackOne Integration`</li>
  <li>**Scope**: **Write** to add, edit and delete resources, or **Read** for read-only access</li>
  <li>Click **Create token**.</li>
</ul>

![The Create API Token form with Description, Scope and Create token highlighted](https://mintcdn.com/stackone-60/EtUZp0-MmlDiTMBD/connectors/ansible/images/custom-config-create-token.png?fit=max\&auto=format\&n=EtUZp0-MmlDiTMBD\&q=85\&s=55b27f67b10889287f81a38868f09039)

**2. Copy the token**

Copy the **Token** across to **API Token**.

<ul>
  <li>The **Token** is only displayed once and cannot be retrieved later.</li>
</ul>

![The Token information dialog with the copy button highlighted](https://mintcdn.com/stackone-60/EtUZp0-MmlDiTMBD/connectors/ansible/images/custom-config-copy-token.png?fit=max\&auto=format\&n=EtUZp0-MmlDiTMBD\&q=85\&s=317771101610abc6bffe6651c1a15c75)

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

## Next Steps

> [card] [Webhooks setup](https://docs.stackone.com/connectors/ansible/guides/webhook-setup.md)
>
> Configure receiving Events for Ansible into StackOne.


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