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

# Applications

> Define target websites, authentication modes, and login flows for managed authentication.

An **application** represents a website your agents need to access — for example `linkedin.com` or `app.example.com`. Applications group **auth flows** (how login works) and **identities** (who logs in).

After you create an application, choose **how users will log in**. This is the most important configuration step — it determines what Anchor asks for when someone connects an account.

<CardGroup cols={3}>
  <Card title="Auto-Discovery Auth" icon="sparkles" href="#auto-discovery-auth">
    Anchor detects the login page and walks through sign-in automatically. Unpredictable login flows or the fastest setup.
  </Card>

  <Card title="Preset authentication" icon="sliders" href="#preset-authentication">
    You define the exact fields and MFA methods (username/password, email OTP, authenticator, etc.). When you know the login steps in advance.
  </Card>

  <Card title="Manual authentication" icon="user" href="#manual-authentication">
    Anchor opens a browser and the user signs in themselves. Unsupported login methods or a hands-on browser experience.
  </Card>
</CardGroup>

## Create an application

<Tabs>
  <Tab title="Dashboard">
    1. Go to [Identities](https://app.anchorbrowser.io/applications) in the Anchor dashboard.
    2. Click **Add application**.
    3. Enter a name and the target site URL or domain.
    4. Choose [how users will log in](#auth-modes). If you're unsure, start with **Auto-Discovery Auth** — you can switch later.
  </Tab>

  <Tab title="API">
    <CodeGroup>
      ```javascript node.js theme={null}
      import Anchorbrowser from 'anchorbrowser';

      const anchorClient = new Anchorbrowser();

      const app = await anchorClient.applications.create({
        name: 'My LinkedIn User',
        source: 'linkedin.com',
      });

      console.log(app.id);
      ```

      ```python python theme={null}
      from anchorbrowser import Anchorbrowser

      anchor_client = Anchorbrowser()

      app = anchor_client.applications.create(
          name="My LinkedIn User",
          source="linkedin.com",
      )

      print(app.id)
      ```
    </CodeGroup>
  </Tab>
</Tabs>

<h2 id="auth-modes">
  Auth modes
</h2>

Each application uses one of three login approaches. Pick the one that matches how your target site works.

<h3 id="auto-discovery-auth">
  Auto-Discovery Auth
</h3>

Anchor opens the target site, analyzes the login page, and guides sign-in automatically. Login steps are detected at runtime — no credential template required upfront.

Use this when:

* The site's login flow changes frequently
* You want the fastest path to a working identity
* You're using [OmniConnect](/essentials/omniconnect) and letting end users sign in

This is pre-selected when you create a new application in the dashboard.

#### Via dashboard

1. Open your application on the [Identities](https://app.anchorbrowser.io/applications) page.
2. Select **Auto-Discovery Auth**.

#### Via API

Set `auth_mode` to `dynauth` when creating or updating an application. This is the default — you can omit it on create.

<CodeGroup>
  ```javascript node.js theme={null}
  // On create (default)
  const app = await anchorClient.applications.create({
    name: 'My App',
    source: 'https://example.com',
    auth_mode: 'dynauth',
  });

  // Or switch an existing application
  await anchorClient.applications.update(app.id, {
    auth_mode: 'dynauth',
  });
  ```

  ```python python theme={null}
  # On create (default)
  app = anchor_client.applications.create(
      name="My App",
      source="https://example.com",
      auth_mode="dynauth",
  )

  # Or switch an existing application
  anchor_client.applications.update(
      application_id=app.id,
      auth_mode="dynauth",
  )
  ```
</CodeGroup>

<h3 id="preset-authentication">
  Preset authentication
</h3>

You define one or more named auth flows with specific [authentication methods](#authentication-methods) — for example username/password plus email MFA, or username/password plus an authenticator secret.

Choose preset authentication when you want to control how login looks:

* You define which fields Anchor collects (username/password, custom inputs, MFA methods)
* You need email OTP, authenticator codes, 1Password, or other specific auth methods
* You want multiple named login flows on the same application

#### Via dashboard

1. Open your application on the [Identities](https://app.anchorbrowser.io/applications) page.
2. Select **Preset authentication** — existing flows appear below.
3. Click **Add flow** to create a new authentication flow.
4. Enter a name and select the **authentication methods** your login requires.
5. Click **Save Changes**.

#### Via API

Set `auth_mode` to `preset`, then create one or more auth flows for the application.

<CodeGroup>
  ```javascript node.js theme={null}
  await anchorClient.applications.update(app.id, {
    auth_mode: 'preset',
  });

  const authFlow = await anchorClient.applications.authFlows.create(app.id, {
    name: 'Email Login with authenticator',
    methods: ['username_password', 'authenticator'],
  });
  ```

  ```python python theme={null}
  anchor_client.applications.update(
      application_id=app.id,
      auth_mode="preset",
  )

  auth_flow = anchor_client.applications.auth_flows.create(
      application_id=app.id,
      name="Email Login with authenticator",
      methods=["username_password", "authenticator"],
  )
  ```
</CodeGroup>

Pass the returned flow `id` as `authOptionId` when [creating an identity](/essentials/authenticated-applications).

<h4 id="authentication-methods">
  Authentication methods
</h4>

Combine methods in a preset flow to match the site's login steps:

| Method              | What Anchor collects                                  | Guide                                |
| ------------------- | ----------------------------------------------------- | ------------------------------------ |
| `username_password` | Username and password                                 | —                                    |
| `authenticator`     | TOTP secret                                           | —                                    |
| `email_mfa`         | Forwarded email OTP via Anchor inbox                  | [Email MFA](/advanced/email-otp)     |
| `sms_mfa`           | SMS OTP codes                                         | —                                    |
| `gmail_mfa`         | Gmail OAuth for reading codes                         | —                                    |
| `one_password`      | Credentials from 1Password vault                      | [1Password](/integrations/1password) |
| `custom`            | Named fields you define (company name, API key, etc.) | —                                    |
| `profile`           | Manual browser login saved to the identity            | —                                    |
| `dynauth`           | Auto-discovery login                                  | —                                    |

<Note>
  Do not mix credential-based methods (`username_password`, `authenticator`, etc.) with browser-based methods (`dynauth`, `profile`) in the same flow. Use separate flows if you need both approaches on one application.
</Note>

##### Custom fields

When a login form has non-standard inputs, add `custom_fields` to your auth flow and pair them with the `custom` method:

```json theme={null}
{
  "name": "Company Login",
  "methods": ["custom", "username_password"],
  "custom_fields": [
    { "name": "company_name" }
  ]
}
```

<h3 id="manual-authentication">
  Manual authentication
</h3>

Anchor opens a secure browser and the user signs in themselves. The resulting session state is saved as an identity.

Choose manual authentication when:

* You want a hands-on browser login experience
* The site uses login methods Anchor does not support yet

<Note>
  With auto-discovery or preset authentication, you can optionally switch to a browser login during identity creation if automated steps fail or the site presents an unexpected challenge.
</Note>

#### Via dashboard

1. Open your application on the [Identities](https://app.anchorbrowser.io/applications) page.
2. Select **Manual authentication**.

#### Via API

Set `auth_mode` to `manual` when creating or updating an application.

<CodeGroup>
  ```javascript node.js theme={null}
  // On create
  const app = await anchorClient.applications.create({
    name: 'My App',
    source: 'https://example.com',
    auth_mode: 'manual',
  });

  // Or switch an existing application
  await anchorClient.applications.update(app.id, {
    auth_mode: 'manual',
  });
  ```

  ```python python theme={null}
  # On create
  app = anchor_client.applications.create(
      name="My App",
      source="https://example.com",
      auth_mode="manual",
  )

  # Or switch an existing application
  anchor_client.applications.update(
      application_id=app.id,
      auth_mode="manual",
  )
  ```
</CodeGroup>

## What happens next

Once your application is configured, [create an identity](/essentials/authenticated-applications) for each account that needs access. Identities store credentials and validated session state; attach them to browser sessions to start signed in.

<h2 id="further-application-setup">
  Further application setup
</h2>

After choosing an auth mode, you can configure defaults that apply to **every identity** under the application — network routing, browser session settings, and application metadata. Open your application on the [Identities](https://app.anchorbrowser.io/applications) page and expand **Advanced**.

### Network defaults

Choose how traffic is routed for authenticated sessions created from this application:

| Option                  | Description                                                         |
| ----------------------- | ------------------------------------------------------------------- |
| **Anchor Proxy**        | Route through Anchor's managed rotating proxy network (default)     |
| **Custom Proxy**        | Route through your own proxy server                                 |
| **Dedicated Sticky IP** | Each identity gets a fixed IP address that persists across sessions |

Network settings apply at the application level and affect all identities under it. See [Proxy](/advanced/proxy), [Bring Your Own Proxy](/advanced/bring-your-own-proxy), and [Dedicated Sticky IP](/advanced/dedicated-sticky-ip) for details.

You can also set `dedicated_sticky_ip` on an individual identity at creation time to override the application default.

### Browser session defaults

Enable **Default Browser Session Configuration** to set defaults merged into every session launched with an identity from this application — for example proxy country, [Extra Stealth](/essentials/stealth), [CAPTCHA solving](/advanced/captcha-solving), or session timeout.

The configuration uses the same schema as the [Start Browser Session](/api-reference/browser-sessions/start-browser-session) API. Session-level options passed at create time still override these defaults.

### Application metadata

Update the application **name** and **description** from the same Advanced panel — useful for organizing applications in the dashboard.

### Via API

Set defaults when creating or updating an application:

<CodeGroup>
  ```javascript node.js theme={null}
  await anchorClient.applications.update(app.id, {
    name: 'Acme Portal',
    description: 'Internal procurement system',
    identityDefaultConfiguration: {
      dedicated_sticky_ip: true,
    },
    browserSessionDefaultConfiguration: {
      session: {
        proxy: { active: true, country_code: 'us' },
      },
      browser: {
        extra_stealth: { active: true },
        captcha_solver: { active: true },
      },
    },
  });
  ```

  ```python python theme={null}
  anchor_client.applications.update(
      application_id=app.id,
      name="Acme Portal",
      description="Internal procurement system",
      identity_default_configuration={
          "dedicated_sticky_ip": True,
      },
      browser_session_default_configuration={
          "session": {
              "proxy": {"active": True, "country_code": "us"},
          },
          "browser": {
              "extra_stealth": {"active": True},
              "captcha_solver": {"active": True},
          },
      },
  )
  ```
</CodeGroup>

## Related

<CardGroup cols={2}>
  <Card title="Managed Authentication Overview" icon="shield-check" href="/essentials/managed-authentication">
    Profiles vs identities and how the model fits together
  </Card>

  <Card title="Identities" icon="id-card" href="/essentials/authenticated-applications">
    Create identities and launch authenticated sessions
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/applications/">
    Applications and auth flow endpoints
  </Card>

  <Card title="OmniConnect" icon="window" href="/essentials/omniconnect">
    Embed identity creation in your product
  </Card>
</CardGroup>
