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

You can generate an Auth Link from the dashboard or programmatically via the API.

> [tab] Manually via Dashboard
>
> An Auth Link can be generated directly from the StackOne dashboard. Here's how:
>
> **1. Navigate to Accounts**
>
> Log in to the StackOne dashboard and select [Accounts](https://app.stackone.com/accounts) from the left menu.
>
> **2. Click the + Link Account button**
>
> A popup will appear asking you to select a method. Choose **Method 1 - Request Authentication**.
>
> ![Accounts page with Link Account button](https://mintcdn.com/stackone-60/SPMqTo9H19qFnwDC/images/accounts-page-link-account.png?fit=max\&auto=format\&n=SPMqTo9H19qFnwDC\&q=85\&s=f9df9fe5cb0149671a15475125c01d01)
>
> **3. 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**.
>
> ![Auth Link form](https://mintcdn.com/stackone-60/SPMqTo9H19qFnwDC/images/auth-link-form.png?fit=max\&auto=format\&n=SPMqTo9H19qFnwDC\&q=85\&s=3509f6dd3d47510652f2bfb733986670)
>
> **4. Optionally add a filter and expiry**
>
> * **Filter by category** - Filter the list of connectors displayed to the end-user by category.
> * **Connector profiles** - Select one or more [connector profiles](https://docs.stackone.com/connect/managing-connectors/connector-profiles.md) across connectors. Selecting categories clears connector profiles, and vice versa.
> * **Link Expiry** - Control how long the link stays valid (default is 30 days).
>
> Then click **Generate**.
>
> **5. Copy and send the link to the end-user**
>
> ![Auth Link generated](https://mintcdn.com/stackone-60/SPMqTo9H19qFnwDC/images/auth-link-generated.png?fit=max\&auto=format\&n=SPMqTo9H19qFnwDC\&q=85\&s=8cd9ace754a36b963a60bbf03f48729f)
>
> The end-user will now be able to connect their accounts using the link.
>
> **6. Capture the account ID**
>
> Once the end-user connects, StackOne fires an `account.created` [webhook event](https://docs.stackone.com/embed/handle-account-events.md) containing the account ID. Persist it against your user: it's the account ID you'll use with every [action call](https://docs.stackone.com/embed/call-actions/overview).
>
> You can also find it through the dashboard on the [Accounts](https://app.stackone.com/accounts) page.
>
> <video controls 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" />
>
> Dashboard Connection Link Generation

> [tab] Programmatically via API
>
> To support a more scalable solution, you can programmatically generate links for end-users.
>
> **1. Create a Connect Session**
>
> Call the [Create Connect Session](https://docs.stackone.com/platform/api-reference/connect-sessions/create-connect-session.md) endpoint with the end-user's details:
>
> * `origin_owner_id` - The end-user identifier in your own system(s), which is how accounts map to your customers in a [multi-tenant setup](https://docs.stackone.com/features/multi-tenant-accounts.md)
> * `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](https://docs.stackone.com/embed/connect-session.md#target-a-specific-connector-profile)
> * `connector_profile_ids` (optional) - Restrict the session to an ordered list of connector profiles
>
> **2. Read the auth\_link\_url**
>
> The response contains an `auth_link_url` property. This is the link to send to the end-user.
>
> **3. 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.
>
> ![StackOne Hub Connector Listing](https://mintcdn.com/stackone-60/zwNwud3MEpkn5Lar/images/hub-connector-listing.png?fit=max\&auto=format\&n=zwNwud3MEpkn5Lar\&q=85\&s=c59d43c73d5b7e6699a76ce519ab53b9)
>
> **4. Capture the account ID**
>
> Once the end-user connects, StackOne fires an `account.created` [webhook event](https://docs.stackone.com/embed/handle-account-events.md) containing the account ID. Persist it against your user: it's the account ID you'll use with every [action call](https://docs.stackone.com/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](https://docs.stackone.com/platform/api-reference/v2/accounts/list-accounts.md).
>
> > [!NOTE]
> >
> > Set `expires_in` (in seconds) to give end-users enough time to complete the connection.
> > (eg. 5 days is 432000, 7 days is 604800)

## Next steps

> [card] [Call Actions](https://docs.stackone.com/embed/call-actions/overview)
>
> With the account linked, call its actions from your product over the Agent SDK, MCP, A2A, or RPC/HTTP.

> [card] [Getting Started](https://docs.stackone.com/embed/getting-started.md)
>
> Return to the end-to-end embedding journey.


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