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

> Link your Ansible account in the StackOne Hub with API Token, 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.

## 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_single_company-config-create-token.png?fit=max\&auto=format\&n=EtUZp0-MmlDiTMBD\&q=85\&s=3bc02d609bc091f3d09add4f455425ca)

**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_single_company-config-copy-token.png?fit=max\&auto=format\&n=EtUZp0-MmlDiTMBD\&q=85\&s=1d60a54e03da26d0309f30332d30ebf9)

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