> ## Documentation Index
> Fetch the complete documentation index at: https://koreai-ai-for-work-dev.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuring the Bitly Action

<Badge icon="arrow-left" color="gray">[Back to Actions Integrations](/ai-for-service/integrations/overview#actions)</Badge>

Connect the Platform to Bitly to shorten long URLs. See [Bitly documentation](https://dev.bitly.com/docs/getting-started/authentication/) for details.

***

## Supported Authorization Types

The platform supports API key authentication for Bitly integration. See [App Authorization Overview](/ai-for-service/app-settings#authorization-profiles) for details.

| Authorization Type                       | Supported |
| ---------------------------------------- | --------- |
| Pre-Authorize the Integration            | Yes       |
| Allow Users to Authorize the Integration | Yes       |

***

## Prerequisites

Before enabling the Bitly action:

* Create a [Bitly Developer](https://dev.bitly.com/) account.
* Create a custom app on the Bitly admin page.
* Copy your Bitly personal access token.

***

## Enable the Bitly Action

Go to **App Settings > Integrations > Actions** and select **Bitly** from the Available actions list.

### Pre-authorize the Integration (Basic Auth)

1. In the **Configurations** dialog, select the **Authorization** tab.

2. Set **Authorization Type** to **Pre-authorize the Integration** > **Basic Auth**.

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/E9o4BvEXCZ64Lebj/ai-for-service/integrations/actions/images/bitly-action-img2.png?fit=max&auto=format&n=E9o4BvEXCZ64Lebj&q=85&s=504cf4a27a9867a1aecac6a0b5cec8ac" alt="Auth type" width="958" height="829" data-path="ai-for-service/integrations/actions/images/bitly-action-img2.png" />

3. Enter your **Personal Access Token**.

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/E9o4BvEXCZ64Lebj/ai-for-service/integrations/actions/images/bitly-action-img3.png?fit=max&auto=format&n=E9o4BvEXCZ64Lebj&q=85&s=0064c167776f336f00a473c489251af9" alt="Enter access token" width="958" height="826" data-path="ai-for-service/integrations/actions/images/bitly-action-img3.png" />

4. Click **Save**. On first configuration, the Integration Successful pop-up appears.

<Note>The Bitly action moves from Available to Configured.</Note>

5. Click **Skip for Now** to install templates later.

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/E9o4BvEXCZ64Lebj/ai-for-service/integrations/actions/images/bitly-action-img5.png?fit=max&auto=format&n=E9o4BvEXCZ64Lebj&q=85&s=ebcdb4a27aeb2974cda9ef473f1bcf74" alt="Skip for now" width="701" height="275" data-path="ai-for-service/integrations/actions/images/bitly-action-img5.png" />

### Allow End Users to Authorize (Basic Auth)

1. In the **Configurations** dialog, select the **Authorization** tab.

2. Set **Authorization Type** to **Allow Users to Authorize the Integration** > **Basic Auth**.

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/E9o4BvEXCZ64Lebj/ai-for-service/integrations/actions/images/bitly-action-img6.png?fit=max&auto=format&n=E9o4BvEXCZ64Lebj&q=85&s=0640bc346cdeeb1ed8bdbdf0ed89d37c" alt="Auth type" width="956" height="827" data-path="ai-for-service/integrations/actions/images/bitly-action-img6.png" />

3. Click **Select Authorization** > **Create New**.

4. Select the authorization mechanism (for example, **API Key**).

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/E9o4BvEXCZ64Lebj/ai-for-service/integrations/actions/images/bitly-action-img7.png?fit=max&auto=format&n=E9o4BvEXCZ64Lebj&q=85&s=65175e7a0855081b66228df7a6708622" alt="API Key" width="759" height="640" data-path="ai-for-service/integrations/actions/images/bitly-action-img7.png" />

   See [App Authorization Overview](/ai-for-service/app-settings#authorization-profiles) for creating Basic Auth profiles.

5. Enter the following credentials:

   | Field                   | Description                              |
   | ----------------------- | ---------------------------------------- |
   | Name                    | Name for the Basic Auth profile          |
   | Tenancy URLs            | Select Yes if tasks require tenancy URLs |
   | Base URL                | Base tenant URL for the Bitly instance   |
   | Authorization Check URL | Auth check URL                           |
   | Description             | Description of the auth profile          |

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/E9o4BvEXCZ64Lebj/ai-for-service/integrations/actions/images/bitly-action-img8.png?fit=max&auto=format&n=E9o4BvEXCZ64Lebj&q=85&s=850e6e68b67d00529d4b344fc193be5a" alt="Basic auth credentials" width="948" height="886" data-path="ai-for-service/integrations/actions/images/bitly-action-img8.png" />

6. Click **Save Auth**, then select the new profile.

7. Click **Save**. The Integration Successful pop-up appears.

***

## Install Bitly Action Templates

1. On the Integration Successful dialog, click **Explore Templates**.

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/E9o4BvEXCZ64Lebj/ai-for-service/integrations/actions/images/bitly-action-img9.png?fit=max&auto=format&n=E9o4BvEXCZ64Lebj&q=85&s=d195d0873da46436fb71a6cbad58c9b2" alt="Explore Templates" width="701" height="275" data-path="ai-for-service/integrations/actions/images/bitly-action-img9.png" />

2. Click **Install** for the desired template.

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/E9o4BvEXCZ64Lebj/ai-for-service/integrations/actions/images/bitly-action-img10.png?fit=max&auto=format&n=E9o4BvEXCZ64Lebj&q=85&s=497c6da56cc2f5dbfe41e06549a7a87b" alt="Install Template" width="703" height="346" data-path="ai-for-service/integrations/actions/images/bitly-action-img10.png" />

3. The associated dialog task is auto-created. Click **Go to Dialog** or navigate to **Automation AI > Use Cases > Dialogs**.

4. To use the templates, see [Using Bitly Action Templates](/ai-for-service/integrations/actions/using-the-bitly-action-template).
