---
title: "Get Dynamic Auth Flow State"
method: GET
path: "/v1/identities/dynamic/state/{session_id}"
tags: ["Identities"]
---

# Get Dynamic Auth Flow State

`GET /v1/identities/dynamic/state/{session_id}`

## Request

- Base URL: `https://api.anchorbrowser.io`
- URL: `https://api.anchorbrowser.io/v1/identities/dynamic/state/{session_id}`
- Auth: API key in header `anchor-api-key`

Read-only snapshot of an in-progress dynamic auth flow. Does not acquire the
flow lock or mutate state.

Poll this endpoint when:
- start/resolve returned `type: detection_failed` with `retryable: true`
  (the next login step is still being determined and may take longer than
  the request timeout)
- start/resolve timed out or returned 409 while a transition is in flight
- you need the current presentation without submitting an answer

`view` is that presentation — the same object start/resolve return. Treat it
as the live step when `phase` is `settled`. While `phase` is `navigating`,
`view` may already describe the next step; `target` is only a progress
label for the in-flight transition.

Keep polling until `view.type` is `decision`, `form`, `authenticated`, a
non-retryable `detection_failed`, or a non-retryable `failed`. Then call
`/resolve` only for `decision`/`form`, `/finalize` for `authenticated`, or
open `live_view_url` for `detection_failed`.

## Path parameters

- `session_id` string, required

## Response `200`

Current auth flow state

- AuthFlowV2State: Poll this after retryable `detection_failed`, a request timeout, or 409. `view` is the same presentation start/resolve return (`type` discriminant). When `phase` is `settled`, it is the current step. When `phase` is `navigating`, it may already describe the next step so you can render (or answer) before the browser finishes moving; it is omitted until there is something to show. Call `/resolve` only when `view.type` is `decision` or `form`.
  - `session_id` string, required
  - `graph_id` integer, required: Internal identifier for this auth flow.
  - `current_step_id` string, required: Identifier of the step the flow last committed. While `phase` is `navigating`, `view` may already describe a later step.
  - `discovery_status` 'in_progress' | 'complete' | 'failed', required: Whether automatic detection of the login steps is still running.
  - `discovery_error` string
  - `phase` 'navigating' | 'settled', required: `navigating` — a browser transition is in flight; `view` may already be the next step. `settled` — idle at a step; `view` is that step.
  - `updated_at` number, required: Unix epoch milliseconds of the last state change.
  - `target` object: Step the browser is moving toward. Present only while `phase` is `navigating`. Use for progress copy (for example "Preparing {label}…"). Not a second presentation — `view` is what to show.
    - `step_id` string
    - `label` string
  - `nav` object, required: Outcome of the latest navigation operation.
    - `status` 'pending' | 'succeeded' | 'failed' | 'none', required
    - `error` string
    - `credentials_rejected` boolean
  - `view` union: Presentation returned by start/resolve. GET `/state` nests the same object as `view` when there is something to show. Discriminated on `type`. Call `/resolve` only for `decision` or `form`.
    - AuthFlowV2DecisionView
      - `session_id` string, required
      - `host` string, required: Hostname the flow was started for.
      - `current_step_label` string, required: Human-readable label of the current login step.
      - `step_id` string, required: Identifier of the current login step.
      - `cdp_url` string, required: CDP websocket URL of the session driving the login.
      - `live_view_url` string, required: URL to watch or take over the session in a browser.
      - `discovery_error` string: Set when automatic step detection hit an error. A partial flow may still be presented.
      - `type` 'decision', required
      - `options` AuthFlowV2DecisionOption[], required: Each item is `{ step_id, label, automatable }`. POST `/resolve` with `{ "choice": "<step_id>" }`.
        - `step_id` string, required: Opaque identifier for this option; pass it back as `choice`.
        - `label` string, required: Human-readable name of the login path (e.g. "Continue with Google").
        - `automatable` boolean, required: True if this path is known to be replayable unattended, without a human.
    - AuthFlowV2FormView
      - `session_id` string, required
      - `host` string, required: Hostname the flow was started for.
      - `current_step_label` string, required: Human-readable label of the current login step.
      - `step_id` string, required: Identifier of the current login step.
      - `cdp_url` string, required: CDP websocket URL of the session driving the login.
      - `live_view_url` string, required: URL to watch or take over the session in a browser.
      - `discovery_error` string: Set when automatic step detection hit an error. A partial flow may still be presented.
      - `type` 'form', required
      - `options` AuthFlowV2FormOption[], required: Each item includes `type` and `automatable`. POST `/resolve` with `{ "option_index": n, "values": { ... } }`.
        - `type` 'credentials' | 'mfa_totp' | 'mfa_sms' | 'mfa_email' | 'sso' | 'captcha' | 'consent' | 'magic_link' | 'passkey' | 'generic' | 'totp_secret' | 'gmail_one_click_integration', required
        - `automatable` boolean, required: True if this option can be replayed unattended without a human.
        - `inputs` object[]
          - `name` string, required
          - `type` string, required
          - `label` string
          - `placeholder` string
          - `value` string
        - `extra_data` object: Type-specific extras. Present only when the option has any.
          - `create_integration_url` string, uri: On `gmail_one_click_integration`. Browser URL to connect Gmail; see the option description for the token it returns.
          - `number` string: On `consent`. Device confirmation number from the live page, when shown.
        - `message` string
        - `provider` string
        - `phoneHint` string
      - `credentials_rejected` boolean: The last submission was rejected (e.g. wrong password) and the same form is re-presented.
      - `credentials_passed` boolean: The previous step just cleared. Transient.
    - AuthFlowV2DetectionFailedView
      - `session_id` string, required
      - `host` string, required: Hostname the flow was started for.
      - `current_step_label` string, required: Human-readable label of the current login step.
      - `step_id` string, required: Identifier of the current login step.
      - `cdp_url` string, required: CDP websocket URL of the session driving the login.
      - `live_view_url` string, required: URL to watch or take over the session in a browser.
      - `discovery_error` string: Set when automatic step detection hit an error. A partial flow may still be presented.
      - `type` 'detection_failed', required
      - `node_status` 'detected' | 'failed' | 'explored', required: How far the current step has been analyzed.
      - `last_error` string: The most recent navigation error, if any.
      - `retryable` boolean, required: True means keep polling `/state`; false means stop and use `live_view_url`.
      - `message` string, required: Why detection stopped. Open `live_view_url` to finish signing in in the browser. Do not resolve. If `retryable` is true, you may also poll GET `/state`.
    - AuthFlowV2AuthenticatedView
      - `session_id` string, required
      - `host` string, required: Hostname the flow was started for.
      - `current_step_label` string, required: Human-readable label of the current login step.
      - `step_id` string, required: Identifier of the current login step.
      - `cdp_url` string, required: CDP websocket URL of the session driving the login.
      - `live_view_url` string, required: URL to watch or take over the session in a browser.
      - `discovery_error` string: Set when automatic step detection hit an error. A partial flow may still be presented.
      - `type` 'authenticated', required
      - `message` string: Human-readable status. POST `/finalize` to persist the identity.
    - AuthFlowV2FailedView
      - `session_id` string, required
      - `host` string, required: Hostname the flow was started for.
      - `current_step_label` string, required: Human-readable label of the current login step.
      - `step_id` string, required: Identifier of the current login step.
      - `cdp_url` string, required: CDP websocket URL of the session driving the login.
      - `live_view_url` string, required: URL to watch or take over the session in a browser.
      - `discovery_error` string: Set when automatic step detection hit an error. A partial flow may still be presented.
      - `type` 'failed', required
      - `error` string, required: What went wrong.
      - `retryable` boolean, required: True means keep polling `/state`; false means stop.

## Other responses

- `404`: Auth flow not found
- `500`: Failed to read auth flow state

## Changes

- **2026-10-16** `b3bfdb98c79e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/anchorbrowser/apis/anchorbrowser-api/changes/v1/identities/dynamic/state/:session_id/get.md)

---

[API](https://skmtc.dev/anchorbrowser/apis/anchorbrowser-api.md) - [All operations](https://skmtc.dev/anchorbrowser/apis/anchorbrowser-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anchorbrowser/apis/anchorbrowser-api/revisions/9d755f22df0e?raw)
