> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowra.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect an account

> Create an auth config if needed, generate an OAuth link, and list connected accounts.

**Goal:** Link a third-party account so tools can run with that user’s credentials.

## Prerequisites

* API key — [Authentication](/authentication)
* Toolkit slug (for example `slack`) and an [auth config](/guides/auth-configs) for that toolkit in your project
* Optional: [SDKs](/guides/sdk)

## Steps

<Steps>
  <Step title="Confirm an auth config">
    List auth configs and note the `authConfigId` for your toolkit. Create one in the dashboard or via the Auth configs API if missing. See [Auth configs](/guides/auth-configs).
  </Step>

  <Step title="Create a link URL">
    <CodeGroup>
      ```bash theme={null}
      curl -X POST "https://flowra.dev/api/v1/connected_accounts/link" \
        -H "x-api-key: YOUR_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{
          "toolkitSlug": "slack",
          "authConfigId": "YOUR_AUTH_CONFIG_ID"
        }'
      ```

      ```ts theme={null}
      import { Flowra } from '@flowra/sdk';

      const flowra = new Flowra({ apiKey: process.env.FLOWRA_API_KEY! });
      const link = await flowra.connections.createLink({
        toolkitSlug: 'slack',
        authConfigId: 'YOUR_AUTH_CONFIG_ID',
      });
      ```

      ```python theme={null}
      from flowra import Flowra

      flowra = Flowra(api_key="YOUR_API_KEY")
      link = flowra.connections.create_link({
          "toolkitSlug": "slack",
          "authConfigId": "YOUR_AUTH_CONFIG_ID",
      })
      ```
    </CodeGroup>

    For a specific end user, also send `x-username` (or use `asUser` / `as_user`). See [Multi-tenancy](/guides/multi-tenancy).
  </Step>

  <Step title="Complete OAuth">
    Open the returned URL in a browser, approve access, then return to your app.
  </Step>

  <Step title="List connected accounts">
    <CodeGroup>
      ```bash theme={null}
      curl -X GET "https://flowra.dev/api/v1/connected_accounts" \
        -H "x-api-key: YOUR_API_KEY"
      ```

      ```ts theme={null}
      const accounts = await flowra.connections.list();
      ```

      ```python theme={null}
      accounts = flowra.connections.list()
      ```
    </CodeGroup>

    Confirm the new connection appears with an active status.
  </Step>
</Steps>

## Verify

* Link endpoint returns a URL
* After OAuth, the account appears in the list
* A tool execute that needs that toolkit succeeds when you pass the connection

## Next

* [Connected accounts](/guides/connected-accounts)
* [Run a workflow](/recipes/run-a-workflow)
* Product UI: [Connections](/product/connections)


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