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

# Auth Link

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

## Overview

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 web app.

## How to generate a link

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](https://app.stackone.com/) and select [Accounts](https://app.stackone.com/accounts) from the left menu.
  </Step>

  <Step title="Click the + Link Account button">
    <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

    * **Category** (optional) - If you have enabled connectors across multiple categories, you can filter the list of connectors displayed. Make sure that the information you enter matches your system precisely.

    Then click **Next** and **Generate**.

    <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="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>

    <Note>
      Note: This link expires after 30 days.
    </Note>

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

### Generating the link programmatically

To support a more scalable solution, you can programmatically generate links for end-users.

Call the [Create Connect Session Endpoint](/platform/api-reference/connect-sessions/create-connect-session) and the `auth_link_url` property in the response contains the link for the end-user.

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

## What the end-user sees

When the user navigates to the **Auth Link**, they will see the **StackOne Hub** with a list of all connectors enabled on your project. The user can then select and connect to the provider they need.

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

## Verifying the connection

After the user has connected an integration successfully, StackOne will fire a `account.created` [webhook event](/guides/webhooks) containing the Account ID (which is required to make a [unified API request](/guides/making-your-first-api-request)). The linked account will also be displayed in the [Accounts](https://app.stackone.com/accounts) page and it will also be visible via the [Accounts API endpoint](/platform/api-reference/accounts/list-accounts).
