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

# Hub (Auth Link)

> Get end-users to connect their accounts with only a link!

Hub **Auth Links** let you deliver a secure URL to your end users for a secure, in-browser connection experience **without** embedding the StackOne Hub in your application. The hosted webpage already includes an implementation of the Hub so there's no front end implementation required from your side.

## Generating a link

There are two ways to generate an Auth Link — from the dashboard, or programmatically via the API.

<Tabs>
  <Tab title="Manually via Dashboard">
    An Auth Link can be generated directly from the StackOne dashboard. Here's how:

    <Steps>
      <Step title="Navigate to Accounts">
        Log in to the StackOne dashboard and select [Accounts](https://app.stackone.com/accounts) from the left menu.
      </Step>

      <Step title="Click the + Link Account button">
        A popup will appear asking you to select a method — choose **Method 1 - Request Authentication**.

        <Frame>
          <img src="https://mintcdn.com/stackone-60/SPMqTo9H19qFnwDC/images/accounts-page-link-account.png?fit=max&auto=format&n=SPMqTo9H19qFnwDC&q=85&s=f9df9fe5cb0149671a15475125c01d01" alt="Accounts page with Link Account button" width="3456" height="1992" data-path="images/accounts-page-link-account.png" />
        </Frame>
      </Step>

      <Step title="Fill in the required fields">
        * **Origin owner ID** - This should be the end-user identifier you use in your own system(s) (most likely, a UUID or integer)

        * **Origin owner name** - This is the end-user name in your own system(s)

        * **Origin username** (optional) - The end-user's username (eg: an email address) that will connect or be responsible for the connection

        Then click **Next**.

        <Frame>
          <img src="https://mintcdn.com/stackone-60/SPMqTo9H19qFnwDC/images/auth-link-form.png?fit=max&auto=format&n=SPMqTo9H19qFnwDC&q=85&s=3509f6dd3d47510652f2bfb733986670" alt="Auth Link form" width="3456" height="1992" data-path="images/auth-link-form.png" />
        </Frame>
      </Step>

      <Step title="Optionally add a filter and expiry">
        * **Filter the Hub** - Filter the list of connectors displayed to the end-user
        * **Connector Profile** - Route the session through a specific connector profile
        * **Link Expiry** - Control how long the link stays valid (default is 30 days)

        Then click **Generate**.
      </Step>

      <Step title="Copy and send the link to the end-user">
        <Frame>
          <img src="https://mintcdn.com/stackone-60/SPMqTo9H19qFnwDC/images/auth-link-generated.png?fit=max&auto=format&n=SPMqTo9H19qFnwDC&q=85&s=8cd9ace754a36b963a60bbf03f48729f" alt="Auth Link generated" width="3456" height="1992" data-path="images/auth-link-generated.png" />
        </Frame>

        The end-user will now be able to connect their accounts using the link.
      </Step>

      <Step title="Capture the account ID">
        Once the end-user connects, StackOne fires an `account.created` [webhook event](/embed/handle-account-events) containing the account ID — persist it against your user: it's the account ID you'll use with every [action call](/embed/call-actions/overview).

        You can also find it through the dashboard on the [Accounts](https://app.stackone.com/accounts) page.
      </Step>
    </Steps>

    <div class="flex justify-center gap-4 my-4">
      <Frame caption="Dashboard Connection Link Generation">
        <video controls className="w-full aspect-video rounded-xl" src="https://mintcdn.com/stackone-60/5eSj_yFjXdePvCoH/videos/hub/hub-link-generation.mov?fit=max&auto=format&n=5eSj_yFjXdePvCoH&q=85&s=6974bf5b79a1b5273143091d25c03d87" data-path="videos/hub/hub-link-generation.mov" />
      </Frame>
    </div>
  </Tab>

  <Tab title="Programmatically via API">
    To support a more scalable solution, you can programmatically generate links for end-users.

    <Steps>
      <Step title="Create a Connect Session">
        Call the [Create Connect Session](/platform/api-reference/connect-sessions/create-connect-session) endpoint with the end-user's details:

        * `origin_owner_id` - The end-user identifier in your own system(s) — how accounts map to your customers in a [multi-tenant setup](/features/multi-tenant-accounts)
        * `origin_owner_name` - The end-user name in your own system(s)
        * `origin_username` (optional) - The end-user's username, e.g. an email address
        * `categories` (optional) - Filter the list of connectors displayed to the end-user
        * `expires_in` (optional) - How long the link stays valid, in seconds
        * `connector_profile_id` (optional) - Route the session through a specific [connector profile](/embed/connect-session#target-a-specific-connector-profile)
      </Step>

      <Step title="Read the auth_link_url">
        The response contains an `auth_link_url` property — this is the link to send to the end-user.
      </Step>

      <Step title="Send the link to the end-user">
        Deliver the `auth_link_url` to your end-user (for example by email). When they open it, they'll see the **StackOne Hub** listing the connectors enabled on your project, where they select and connect their account.

        <Frame>
          <img src="https://mintcdn.com/stackone-60/zwNwud3MEpkn5Lar/images/hub-connector-listing.png?fit=max&auto=format&n=zwNwud3MEpkn5Lar&q=85&s=c59d43c73d5b7e6699a76ce519ab53b9" alt="StackOne Hub Connector Listing" width="996" height="1216" data-path="images/hub-connector-listing.png" />
        </Frame>
      </Step>

      <Step title="Capture the account ID">
        Once the end-user connects, StackOne fires an `account.created` [webhook event](/embed/handle-account-events) containing the account ID — persist it against your user: it's the account ID you'll use with every [action call](/embed/call-actions/overview).

        You can also find it through the dashboard on the [Accounts](https://app.stackone.com/accounts) page, or via the [List Accounts endpoint](/platform/api-reference/accounts/list-accounts).
      </Step>
    </Steps>

    <Info>
      Set `expires_in` (in seconds) to give end-users enough time to complete the connection.
      (eg. 5 days is 432000, 7 days is 604800)
    </Info>
  </Tab>
</Tabs>

## Next steps

<CardGroup cols={2}>
  <Card title="Call Actions" icon="code" href="/embed/call-actions/overview">
    With the account linked, call its actions from your product — over the Agent SDK, MCP, A2A, or RPC/HTTP.
  </Card>

  <Card title="Embed Overview" icon="map" href="/embed/getting-started">
    Return to the end-to-end embedding journey.
  </Card>
</CardGroup>
