---
title: "Resolve Dynamic Auth Flow Step"
method: POST
path: "/v1/identities/dynamic/resolve/{session_id}"
tags: ["Identities"]
---

# Resolve Dynamic Auth Flow Step

`POST /v1/identities/dynamic/resolve/{session_id}`

## Request

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

Advances the flow by answering the current step. The body depends on the
last presentation's `type` — do not mix the two shapes:

- **`decision`**: send only `choice` (a `step_id` from `options`).
  Do not send `option_index` or `values`.
- **`form`**: send `option_index` (index into `options`) and `values`
  (field name → string). Do not send `choice`.

Do not call `/resolve` for `detection_failed`, `authenticated`, or `failed`.
For retryable `detection_failed`, a timeout, or a 409 (another transition
still in flight), poll `GET .../state/{session_id}` until a
`decision`/`form`/`authenticated` view appears, then continue. If
`detection_failed` is not retryable, open `live_view_url` to finish signing in.

## Path parameters

- `session_id` string, required

## Request body

- union: Body depends on the last `view.type`. Use the `decision` shape or the `form` shape — not both.
  - AuthFlowV2FormResolve: Send this when the last presentation was a form step.
    - `option_index` integer, required: Index into that form's `options` list.
    - `values` object, required: Map of input name → value for the selected option (`options[option_index].inputs` lists the names).
  - AuthFlowV2DecisionResolve: Send this when the last presentation was a decision step.
    - `choice` string, required: One of `options[].step_id` from the decision view.

## Response `200`

Next presentation of the auth flow

- 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

- `400`: Invalid choice, option index, or missing field
- `404`: Session, flow, or step not found
- `409`: Auth flow transition already in progress
- `500`: Failed to resolve auth flow

## Changes

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

[Operation history](https://skmtc.dev/anchorbrowser/apis/anchorbrowser-api/changes/v1/identities/dynamic/resolve/:session_id/post.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)
