Flow Execution API for App Native Authentication
Drive app-native authentication flows step by step. The caller initiates a flow, receives a step descriptor, submits the required input, and repeats until the flow reaches a success or failure terminal state.
Download the OpenAPI definition (YAML)
Security schemes
FlowSecret: API key in header "Flow-Secret"
Flow Secret used to authenticate backend/server-side applications when initiating a flow directly. Required for full-stack, custom, and mcp applications with no OAuth configuration, or with a confidential OAuth client that has the urn:ietf:params:oauth:grant-type:token-exchange grant and does not use the redirect-based authorization_code flow; ignored for other applications.
OAuth2: oauth2
Access token. An administration flow initiated by flowId requires a token carrying the system scope; a SELF flow requires the signed-in user's token.
authorizationCode flow, token URL https://localhost:8090/oauth2/token, authorization URL https://localhost:8090/oauth2/authorize
1 scopes
| Scope | Description |
|---|---|
system | Access to system management APIs |
clientCredentials flow, token URL https://localhost:8090/oauth2/token
1 scopes
| Scope | Description |
|---|---|
system | Access to system management APIs |
Flow Execution
Execute app native authentication and registration flow steps, and run administration flows by their flow identifier.
Execute a flow step
POST /flow/execute
Execute a step in a flow. Backend/server-side applications must present their Flow Secret in the Flow-Secret header (see the FlowSecret security scheme) when initiating a new flow; the header is ignored for other application types.
A flow is initiated by applicationId and flowType, by flowType and handle for a SELF flow, or, for administration and invitation flows only, by flowId. Initiating by flowId requires an access token carrying the system scope. An INVITATION flow also requires the token to be issued for an organization unit, which the flow then acts for, and that organization unit to own the flow or have it shared with it. Any other flow type is rejected with 403. A DEVICE_GRANT request starts the Device Grant flow assigned to the specified application. Supplying the step's inputs on the initiating request runs the flow through to its terminal state in a single call; omitting them returns the required inputs and an executionId to continue with.
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Attestation-Token | header | string | Platform attestation token (e.g. a Google Play Integrity token) presented by a mobile application when initiating a new authentication flow. Required only for applications configured with attestation; ignored when continuing an existing flow via executionId. |
Request body (required): application/json
Schema: one of: InitialFlowRequest, SelfFlowRequest, AdministrativeFlowRequest, SubSequentFlowRequest
Responses
| Code | Description | Schema |
|---|---|---|
200 | Flow step executed successfully.
Flow-level failures are returned with HTTP 200 and | one of: IncompleteFlowResponse, CompleteFlowResponse, ErrorFlowResponse |
400 | Bad Request: The request body is malformed or contains invalid data. An | Error |
401 | Unauthorized: The application must present a valid credential to initiate a new flow — a Flow Secret for backend applications, or a platform attestation token for mobile applications — and the presented credential was missing or invalid, or the flow runs for a signed-in user and the user's access token was missing or invalid. | Error |
403 | Forbidden: Direct flow initiation is not permitted for this application or its OAuth configuration, the application is suspended, or the flow started by | Error |
500 | Internal Server Error: An unexpected error occurred while processing the request | Error |
Schemas
InitialFlowRequest
Type: object
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
applicationId | string | Yes | Identifier of the application initiating the flow |
flowType | string | Yes | Type of the flow to execute Allowed values: |
verbose | boolean | When true, the response includes full UI metadata (meta/components) for prompt nodes | |
sessionData | FlowRequestSessionData | Every SSO session the caller holds, as returned in earlier responses' | |
ouId | string | Identifier of the organization unit to sign in to. Accepted only with |
SelfFlowRequest
Type: object
Initiates a SELF flow by its handle. The caller must present the signed-in user's access token.
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
flowType | string | Yes | Allowed values: |
handle | string | Yes | Handle of the |
inputs | object | Input data for the flow | |
action | string | Reference of the action to execute in the flow | |
verbose | boolean | When true, the response includes full UI metadata (meta/components) for prompt nodes |
AdministrativeFlowRequest
Type: object
Initiates an administration or invitation flow by its identifier. Only flows of type ADMINISTRATION or INVITATION may be started this way, and the caller must present an access token carrying the system scope. An INVITATION flow also requires the token to be issued for an organization unit that owns the flow or was shared it.
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
flowId | string | Yes | Identifier of the flow to execute. The flow must be of type |
inputs | object | Input data for the flow. Supplying every required input here runs the flow to its terminal state in this single call; omitting them returns the inputs to supply on a follow-up request. A value sent for an input that an executor node holds constant is ignored without an error, unless another executor node lists the same input without constant. | |
action | string | Reference of the action to execute in the flow | |
verbose | boolean | When true, the response includes full UI metadata (meta/components) for prompt nodes |
SubSequentFlowRequest
Type: object
6 properties
| Name | Type | Required | Description |
|---|---|---|---|
executionId | string | Yes | Identifier of an existing flow execution |
challengeToken | string | Per-step challenge token received from the previous flow response | |
action | string | Reference of the action to execute in the flow | |
inputs | object | Input data provided for the flow step execution. A value sent for an input that an executor node holds constant is ignored without an error, unless another executor node lists the same input without constant. | |
verbose | boolean | When true, the response includes full UI metadata (meta/components) for prompt nodes | |
sessionData | FlowRequestSessionData | Every SSO session the caller holds, as returned in earlier responses' |
IncompleteFlowResponse
Type: object
14 properties
| Name | Type | Required | Description |
|---|---|---|---|
executionId | string | Yes | Unique identifier of the flow execution |
flowStatus | string | Yes | Status of the flow execution Allowed values: |
stepId | string | Yes | Identifier of the current flow step |
challengeToken | string | Per-step challenge token to be included in the next request | |
type | string | Yes | Type of flow step response |
data | Data | Data for the next step in the flow | |
data.inputs | array of Input | Required input data for the next flow step | |
data.redirectURL | string | Redirect URL for the next step in the flow if applicable | |
data.additionalData | object | Additional information provided by the flow step | |
data.actions | array of Action | Available actions for the current flow step | |
data.meta | object | UI rendering metadata for display-only PROMPT nodes, returned when executing in verbose mode.
Contains a | |
data.fieldErrors | array of FieldError | Per-field validation failures returned when one or more submitted values violate the rules declared on | |
sessionData | FlowResponseSessionData | The SSO sessions this step started, in the same shape as the request's | |
clearedSessions | FlowClearedSessions | Flow identifiers of the SSO sessions a sign-out in this step ended. An identifier is listed even when its session had already ended, so the listing does not confirm the session was active. A caller that holds its sessions itself drops the |
CompleteFlowResponse
Type: object
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
executionId | string | Yes | Unique identifier of the flow execution |
flowStatus | string | Yes | Status of the flow execution Allowed values: |
assertion | string | Yes | Authentication assertion. This will be the JWT authentication token |
sessionData | FlowResponseSessionData | The SSO sessions this step started, in the same shape as the request's | |
clearedSessions | FlowClearedSessions | Flow identifiers of the SSO sessions a sign-out in this step ended. An identifier is listed even when its session had already ended, so the listing does not confirm the session was active. A caller that holds its sessions itself drops the |
ErrorFlowResponse
Type: object
7 properties
| Name | Type | Required | Description |
|---|---|---|---|
executionId | string | Yes | Unique identifier of the flow execution |
flowStatus | string | Yes | Status of the flow execution Allowed values: |
error | Error | Yes | |
data | Data | Additional flow data included with a signed error assertion when the caller needs to complete an OAuth callback. Device Grant failures include the callback type and authId when the user code was already claimed. | |
errorAssertion | string | Optionally returned signed JWT error assertion. It carries the flow error type and description bound to that authorization request. | |
sessionData | FlowResponseSessionData | The SSO sessions this step started, in the same shape as the request's | |
clearedSessions | FlowClearedSessions | Flow identifiers of the SSO sessions a sign-out in this step ended. An identifier is listed even when its session had already ended, so the listing does not confirm the session was active. A caller that holds its sessions itself drops the |
FlowRequestSessionData
Type: array of FlowSessionData
Every SSO session the caller holds, as returned in earlier responses' sessionData. The server uses the one whose flowIdentifier matches the flow whose session the request acts on, as a browser's per-flow session cookies are matched, and uses it instead of the session cookie. That is the flow being run, except for a SIGNOUT flow, which acts on the application's sign-in flow. Send it on every request of the flow, not only the first: the handle is not kept with the flow, so a Check SSO Session node reached after a prompt step uses the one sent with that request. An entry without a flowIdentifier or a sessionHandle is refused with FES-1021.
FlowResponseSessionData
Type: array of FlowIssuedSessionData
The SSO sessions this step started, in the same shape as the request's sessionData, plus expiresIn. Returned only on the response of the step that started them. A caller that holds its sessions itself keeps them with any others it holds and sends them all back in later requests' sessionData. The session cookie is set as well.
FlowClearedSessions
Type: array of string
Flow identifiers of the SSO sessions a sign-out in this step ended. An identifier is listed even when its session had already ended, so the listing does not confirm the session was active. A caller that holds its sessions itself drops the sessionData held under each.
FlowSessionData
Type: object
One SSO session a caller holds, keyed by the flow it belongs to, as a browser holds it in a per-flow session cookie. The handle resumes the session, so keep it as secret as a credential.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
flowIdentifier | string | Yes | Opaque identifier of the flow the session belongs to |
sessionHandle | string | Yes | Handle of the SSO session |
FlowIssuedSessionData
Type: FlowSessionData
An SSO session a step started, with how long its handle stays usable. The session can still end earlier, through its idle timeout or a sign-out.
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
flowIdentifier | string | Yes | Opaque identifier of the flow the session belongs to |
sessionHandle | string | Yes | Handle of the SSO session |
expiresIn | integer (int64) | Yes | Seconds until the session reaches its absolute timeout, after which the handle no longer resumes it. The per-flow session cookie carries the same lifetime as its Max-Age. |
Data
Type: object
6 properties
| Name | Type | Required | Description |
|---|---|---|---|
inputs | array of Input | Required input data for the next flow step | |
redirectURL | string | Redirect URL for the next step in the flow if applicable | |
additionalData | object | Additional information provided by the flow step | |
actions | array of Action | Available actions for the current flow step | |
meta | object | UI rendering metadata for display-only PROMPT nodes, returned when executing in verbose mode.
Contains a | |
fieldErrors | array of FieldError | Per-field validation failures returned when one or more submitted values violate the rules declared on |
Action
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
ref | string | Reference name of the action, used for mapping user actions to the flow definition | |
nextNode | string | Identifier of the next node in the flow to execute when this action is taken | |
type | string | Action type forwarded from the PROMPT node definition. The value is an opaque string: the flow author and the executor that consumes it agree on the vocabulary, so the recognized values are documented by that executor rather than fixed here. |
Input
Type: object
7 properties
| Name | Type | Required | Description |
|---|---|---|---|
ref | string | Reference name of the input field, used for mapping user inputs to the meta components | |
identifier | string | Name of the input field | |
type | string | Type of the input field | |
required | boolean | Whether the input is required | |
defaultValue | string | Default value the flow author set for the input. A client can show the input prefilled with it, and the person can change it. When the person submits the prompt and the input is empty or missing, the default value is used. Present only for a prompt input that has a default value, including on the prompt shown again after a failed validation. The same default value is the value of the field's meta component when the request sets verbose. | |
options | array of string | Allowed values for SELECT-type inputs | |
validation | array of ValidationRule | Server-enforced validation rules applied to the submitted value after the required-input presence check. When any rule fails, the response returns |
ValidationRule
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Constraint type. Each rule object carries exactly one constraint. Allowed values: |
value | one of: string, integer | Yes | Constraint parameter. |
message | string | Message returned in |
FieldError
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
identifier | string | Yes | Identifier of the input field whose validation rule failed |
message | string | Yes | Message from the failing validation rule, returned as is from the
rule's |
Error
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Error code. Client errors follow the FES-XXXX convention; server errors use SSE-XXXX. | |
message | I18nMessage | Internationalized message with translation key and default value. | |
description | I18nMessage | Internationalized message with translation key and default value. | |
errorAssertion | string | Optionally returned signed JWT error assertion. It carries the flow error type and description bound to that authorization request. |
I18nMessage
Type: object
Internationalized message with translation key and default value.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Translation key for fetching localized message. |
defaultValue | string | Yes | Default message in English (fallback). |
Was this page helpful?