Package sh.ory.api

Class FrontendApi

java.lang.Object
sh.ory.api.FrontendApi

public class FrontendApi
extends Object
  • Constructor Details

    • FrontendApi

      public FrontendApi()
    • FrontendApi

      public FrontendApi​(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient​(ApiClient apiClient)
    • getHostIndex

      public int getHostIndex()
    • setHostIndex

      public void setHostIndex​(int hostIndex)
    • getCustomBaseUrl

      public String getCustomBaseUrl()
    • setCustomBaseUrl

      public void setCustomBaseUrl​(String customBaseUrl)
    • createBrowserLoginFlowCall

      public okhttp3.Call createBrowserLoginFlowCall​(Boolean refresh, String aal, String returnTo, String cookie, String loginChallenge, ApiCallback _callback) throws ApiException
      Build call for createBrowserLoginFlow
      Parameters:
      refresh - Refresh a login session If set to true, this will refresh an existing login session by asking the user to sign in again. This will reset the authenticated_at time of the session. (optional)
      aal - Request a Specific AuthenticationMethod Assurance Level Use this parameter to upgrade an existing session's authenticator assurance level (AAL). This allows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password, the AAL is 1. If you wish to \"upgrade\" the session's security by asking the user to perform TOTP / WebAuth/ ... you would set this to \"aal2\". (optional)
      returnTo - The URL to return the browser to after the flow was completed. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      loginChallenge - An optional Hydra login challenge. If present, Kratos will cooperate with Ory Hydra to act as an OAuth2 identity provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/login?login_challenge=abcde`). (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 loginFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 errorGeneric -
      0 errorGeneric -
    • createBrowserLoginFlow

      public LoginFlow createBrowserLoginFlow​(Boolean refresh, String aal, String returnTo, String cookie, String loginChallenge) throws ApiException
      Create Login Flow for Browsers This endpoint initializes a browser-based user login flow. This endpoint will set the appropriate cookies and anti-CSRF measures required for browser-based flows. If this endpoint is opened as a link in the browser, it will be redirected to `selfservice.flows.login.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url` unless the query parameter `?refresh=true` was set. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `session_aal1_required`: Multi-factor auth (e.g. 2fa) was requested but the user has no session yet. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! The optional query parameter login_challenge is set when using Kratos with Hydra in an OAuth2 flow. See the oauth2_provider.url configuration option. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Parameters:
      refresh - Refresh a login session If set to true, this will refresh an existing login session by asking the user to sign in again. This will reset the authenticated_at time of the session. (optional)
      aal - Request a Specific AuthenticationMethod Assurance Level Use this parameter to upgrade an existing session's authenticator assurance level (AAL). This allows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password, the AAL is 1. If you wish to \"upgrade\" the session's security by asking the user to perform TOTP / WebAuth/ ... you would set this to \"aal2\". (optional)
      returnTo - The URL to return the browser to after the flow was completed. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      loginChallenge - An optional Hydra login challenge. If present, Kratos will cooperate with Ory Hydra to act as an OAuth2 identity provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/login?login_challenge=abcde`). (optional)
      Returns:
      LoginFlow
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 loginFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 errorGeneric -
      0 errorGeneric -
    • createBrowserLoginFlowWithHttpInfo

      public ApiResponse<LoginFlow> createBrowserLoginFlowWithHttpInfo​(Boolean refresh, String aal, String returnTo, String cookie, String loginChallenge) throws ApiException
      Create Login Flow for Browsers This endpoint initializes a browser-based user login flow. This endpoint will set the appropriate cookies and anti-CSRF measures required for browser-based flows. If this endpoint is opened as a link in the browser, it will be redirected to `selfservice.flows.login.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url` unless the query parameter `?refresh=true` was set. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `session_aal1_required`: Multi-factor auth (e.g. 2fa) was requested but the user has no session yet. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! The optional query parameter login_challenge is set when using Kratos with Hydra in an OAuth2 flow. See the oauth2_provider.url configuration option. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Parameters:
      refresh - Refresh a login session If set to true, this will refresh an existing login session by asking the user to sign in again. This will reset the authenticated_at time of the session. (optional)
      aal - Request a Specific AuthenticationMethod Assurance Level Use this parameter to upgrade an existing session's authenticator assurance level (AAL). This allows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password, the AAL is 1. If you wish to \"upgrade\" the session's security by asking the user to perform TOTP / WebAuth/ ... you would set this to \"aal2\". (optional)
      returnTo - The URL to return the browser to after the flow was completed. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      loginChallenge - An optional Hydra login challenge. If present, Kratos will cooperate with Ory Hydra to act as an OAuth2 identity provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/login?login_challenge=abcde`). (optional)
      Returns:
      ApiResponse<LoginFlow>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 loginFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 errorGeneric -
      0 errorGeneric -
    • createBrowserLoginFlowAsync

      public okhttp3.Call createBrowserLoginFlowAsync​(Boolean refresh, String aal, String returnTo, String cookie, String loginChallenge, ApiCallback<LoginFlow> _callback) throws ApiException
      Create Login Flow for Browsers (asynchronously) This endpoint initializes a browser-based user login flow. This endpoint will set the appropriate cookies and anti-CSRF measures required for browser-based flows. If this endpoint is opened as a link in the browser, it will be redirected to `selfservice.flows.login.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url` unless the query parameter `?refresh=true` was set. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `session_aal1_required`: Multi-factor auth (e.g. 2fa) was requested but the user has no session yet. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! The optional query parameter login_challenge is set when using Kratos with Hydra in an OAuth2 flow. See the oauth2_provider.url configuration option. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Parameters:
      refresh - Refresh a login session If set to true, this will refresh an existing login session by asking the user to sign in again. This will reset the authenticated_at time of the session. (optional)
      aal - Request a Specific AuthenticationMethod Assurance Level Use this parameter to upgrade an existing session's authenticator assurance level (AAL). This allows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password, the AAL is 1. If you wish to \"upgrade\" the session's security by asking the user to perform TOTP / WebAuth/ ... you would set this to \"aal2\". (optional)
      returnTo - The URL to return the browser to after the flow was completed. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      loginChallenge - An optional Hydra login challenge. If present, Kratos will cooperate with Ory Hydra to act as an OAuth2 identity provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/login?login_challenge=abcde`). (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 loginFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 errorGeneric -
      0 errorGeneric -
    • createBrowserLogoutFlowCall

      public okhttp3.Call createBrowserLogoutFlowCall​(String cookie, ApiCallback _callback) throws ApiException
      Build call for createBrowserLogoutFlow
      Parameters:
      cookie - HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 logoutFlow -
      401 errorGeneric -
      500 errorGeneric -
    • createBrowserLogoutFlow

      public LogoutFlow createBrowserLogoutFlow​(String cookie) throws ApiException
      Create a Logout URL for Browsers This endpoint initializes a browser-based user logout flow and a URL which can be used to log out the user. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). For API clients you can call the `/self-service/logout/api` URL directly with the Ory Session Token. The URL is only valid for the currently signed in user. If no user is signed in, this endpoint returns a 401 error. When calling this endpoint from a backend, please ensure to properly forward the HTTP cookies.
      Parameters:
      cookie - HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request. (optional)
      Returns:
      LogoutFlow
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 logoutFlow -
      401 errorGeneric -
      500 errorGeneric -
    • createBrowserLogoutFlowWithHttpInfo

      public ApiResponse<LogoutFlow> createBrowserLogoutFlowWithHttpInfo​(String cookie) throws ApiException
      Create a Logout URL for Browsers This endpoint initializes a browser-based user logout flow and a URL which can be used to log out the user. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). For API clients you can call the `/self-service/logout/api` URL directly with the Ory Session Token. The URL is only valid for the currently signed in user. If no user is signed in, this endpoint returns a 401 error. When calling this endpoint from a backend, please ensure to properly forward the HTTP cookies.
      Parameters:
      cookie - HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request. (optional)
      Returns:
      ApiResponse<LogoutFlow>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 logoutFlow -
      401 errorGeneric -
      500 errorGeneric -
    • createBrowserLogoutFlowAsync

      public okhttp3.Call createBrowserLogoutFlowAsync​(String cookie, ApiCallback<LogoutFlow> _callback) throws ApiException
      Create a Logout URL for Browsers (asynchronously) This endpoint initializes a browser-based user logout flow and a URL which can be used to log out the user. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). For API clients you can call the `/self-service/logout/api` URL directly with the Ory Session Token. The URL is only valid for the currently signed in user. If no user is signed in, this endpoint returns a 401 error. When calling this endpoint from a backend, please ensure to properly forward the HTTP cookies.
      Parameters:
      cookie - HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 logoutFlow -
      401 errorGeneric -
      500 errorGeneric -
    • createBrowserRecoveryFlowCall

      public okhttp3.Call createBrowserRecoveryFlowCall​(String returnTo, ApiCallback _callback) throws ApiException
      Build call for createBrowserRecoveryFlow
      Parameters:
      returnTo - The URL to return the browser to after the flow was completed. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 recoveryFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 errorGeneric -
      0 errorGeneric -
    • createBrowserRecoveryFlow

      public RecoveryFlow createBrowserRecoveryFlow​(String returnTo) throws ApiException
      Create Recovery Flow for Browsers This endpoint initializes a browser-based account recovery flow. Once initialized, the browser will be redirected to `selfservice.flows.recovery.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists, the browser is returned to the configured return URL. If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects or a 400 bad request error if the user is already authenticated. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
      Parameters:
      returnTo - The URL to return the browser to after the flow was completed. (optional)
      Returns:
      RecoveryFlow
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 recoveryFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 errorGeneric -
      0 errorGeneric -
    • createBrowserRecoveryFlowWithHttpInfo

      public ApiResponse<RecoveryFlow> createBrowserRecoveryFlowWithHttpInfo​(String returnTo) throws ApiException
      Create Recovery Flow for Browsers This endpoint initializes a browser-based account recovery flow. Once initialized, the browser will be redirected to `selfservice.flows.recovery.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists, the browser is returned to the configured return URL. If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects or a 400 bad request error if the user is already authenticated. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
      Parameters:
      returnTo - The URL to return the browser to after the flow was completed. (optional)
      Returns:
      ApiResponse<RecoveryFlow>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 recoveryFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 errorGeneric -
      0 errorGeneric -
    • createBrowserRecoveryFlowAsync

      public okhttp3.Call createBrowserRecoveryFlowAsync​(String returnTo, ApiCallback<RecoveryFlow> _callback) throws ApiException
      Create Recovery Flow for Browsers (asynchronously) This endpoint initializes a browser-based account recovery flow. Once initialized, the browser will be redirected to `selfservice.flows.recovery.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists, the browser is returned to the configured return URL. If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects or a 400 bad request error if the user is already authenticated. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
      Parameters:
      returnTo - The URL to return the browser to after the flow was completed. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 recoveryFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 errorGeneric -
      0 errorGeneric -
    • createBrowserRegistrationFlowCall

      public okhttp3.Call createBrowserRegistrationFlowCall​(String returnTo, String loginChallenge, ApiCallback _callback) throws ApiException
      Build call for createBrowserRegistrationFlow
      Parameters:
      returnTo - The URL to return the browser to after the flow was completed. (optional)
      loginChallenge - Ory OAuth 2.0 Login Challenge. If set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/registration?login_challenge=abcde`). This feature is compatible with Ory Hydra when not running on the Ory Network. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 registrationFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      0 errorGeneric -
    • createBrowserRegistrationFlow

      public RegistrationFlow createBrowserRegistrationFlow​(String returnTo, String loginChallenge) throws ApiException
      Create Registration Flow for Browsers This endpoint initializes a browser-based user registration flow. This endpoint will set the appropriate cookies and anti-CSRF measures required for browser-based flows. :::info This endpoint is EXPERIMENTAL and subject to potential breaking changes in the future. ::: If this endpoint is opened as a link in the browser, it will be redirected to `selfservice.flows.registration.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url`. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! If this endpoint is called via an AJAX request, the response contains the registration flow without a redirect. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Parameters:
      returnTo - The URL to return the browser to after the flow was completed. (optional)
      loginChallenge - Ory OAuth 2.0 Login Challenge. If set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/registration?login_challenge=abcde`). This feature is compatible with Ory Hydra when not running on the Ory Network. (optional)
      Returns:
      RegistrationFlow
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 registrationFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      0 errorGeneric -
    • createBrowserRegistrationFlowWithHttpInfo

      public ApiResponse<RegistrationFlow> createBrowserRegistrationFlowWithHttpInfo​(String returnTo, String loginChallenge) throws ApiException
      Create Registration Flow for Browsers This endpoint initializes a browser-based user registration flow. This endpoint will set the appropriate cookies and anti-CSRF measures required for browser-based flows. :::info This endpoint is EXPERIMENTAL and subject to potential breaking changes in the future. ::: If this endpoint is opened as a link in the browser, it will be redirected to `selfservice.flows.registration.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url`. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! If this endpoint is called via an AJAX request, the response contains the registration flow without a redirect. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Parameters:
      returnTo - The URL to return the browser to after the flow was completed. (optional)
      loginChallenge - Ory OAuth 2.0 Login Challenge. If set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/registration?login_challenge=abcde`). This feature is compatible with Ory Hydra when not running on the Ory Network. (optional)
      Returns:
      ApiResponse<RegistrationFlow>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 registrationFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      0 errorGeneric -
    • createBrowserRegistrationFlowAsync

      public okhttp3.Call createBrowserRegistrationFlowAsync​(String returnTo, String loginChallenge, ApiCallback<RegistrationFlow> _callback) throws ApiException
      Create Registration Flow for Browsers (asynchronously) This endpoint initializes a browser-based user registration flow. This endpoint will set the appropriate cookies and anti-CSRF measures required for browser-based flows. :::info This endpoint is EXPERIMENTAL and subject to potential breaking changes in the future. ::: If this endpoint is opened as a link in the browser, it will be redirected to `selfservice.flows.registration.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url`. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! If this endpoint is called via an AJAX request, the response contains the registration flow without a redirect. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Parameters:
      returnTo - The URL to return the browser to after the flow was completed. (optional)
      loginChallenge - Ory OAuth 2.0 Login Challenge. If set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/registration?login_challenge=abcde`). This feature is compatible with Ory Hydra when not running on the Ory Network. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 registrationFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      0 errorGeneric -
    • createBrowserSettingsFlowCall

      public okhttp3.Call createBrowserSettingsFlowCall​(String returnTo, String cookie, ApiCallback _callback) throws ApiException
      Build call for createBrowserSettingsFlow
      Parameters:
      returnTo - The URL to return the browser to after the flow was completed. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 settingsFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 errorGeneric -
      401 errorGeneric -
      403 errorGeneric -
      0 errorGeneric -
    • createBrowserSettingsFlow

      public SettingsFlow createBrowserSettingsFlow​(String returnTo, String cookie) throws ApiException
      Create Settings Flow for Browsers This endpoint initializes a browser-based user settings flow. Once initialized, the browser will be redirected to `selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid Ory Kratos Session Cookie is included in the request, a login flow will be initialized. If this endpoint is opened as a link in the browser, it will be redirected to `selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid user session was set, the browser will be redirected to the login endpoint. If this endpoint is called via an AJAX request, the response contains the settings flow without any redirects or a 401 forbidden error if no valid session was set. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor (happens automatically for server-side browser flows) or change the configuration. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `session_inactive`: No Ory Session was found - sign in a user first. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
      Parameters:
      returnTo - The URL to return the browser to after the flow was completed. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      Returns:
      SettingsFlow
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 settingsFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 errorGeneric -
      401 errorGeneric -
      403 errorGeneric -
      0 errorGeneric -
    • createBrowserSettingsFlowWithHttpInfo

      public ApiResponse<SettingsFlow> createBrowserSettingsFlowWithHttpInfo​(String returnTo, String cookie) throws ApiException
      Create Settings Flow for Browsers This endpoint initializes a browser-based user settings flow. Once initialized, the browser will be redirected to `selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid Ory Kratos Session Cookie is included in the request, a login flow will be initialized. If this endpoint is opened as a link in the browser, it will be redirected to `selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid user session was set, the browser will be redirected to the login endpoint. If this endpoint is called via an AJAX request, the response contains the settings flow without any redirects or a 401 forbidden error if no valid session was set. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor (happens automatically for server-side browser flows) or change the configuration. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `session_inactive`: No Ory Session was found - sign in a user first. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
      Parameters:
      returnTo - The URL to return the browser to after the flow was completed. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      Returns:
      ApiResponse<SettingsFlow>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 settingsFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 errorGeneric -
      401 errorGeneric -
      403 errorGeneric -
      0 errorGeneric -
    • createBrowserSettingsFlowAsync

      public okhttp3.Call createBrowserSettingsFlowAsync​(String returnTo, String cookie, ApiCallback<SettingsFlow> _callback) throws ApiException
      Create Settings Flow for Browsers (asynchronously) This endpoint initializes a browser-based user settings flow. Once initialized, the browser will be redirected to `selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid Ory Kratos Session Cookie is included in the request, a login flow will be initialized. If this endpoint is opened as a link in the browser, it will be redirected to `selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid user session was set, the browser will be redirected to the login endpoint. If this endpoint is called via an AJAX request, the response contains the settings flow without any redirects or a 401 forbidden error if no valid session was set. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor (happens automatically for server-side browser flows) or change the configuration. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `session_inactive`: No Ory Session was found - sign in a user first. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
      Parameters:
      returnTo - The URL to return the browser to after the flow was completed. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 settingsFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 errorGeneric -
      401 errorGeneric -
      403 errorGeneric -
      0 errorGeneric -
    • createBrowserVerificationFlowCall

      public okhttp3.Call createBrowserVerificationFlowCall​(String returnTo, ApiCallback _callback) throws ApiException
      Build call for createBrowserVerificationFlow
      Parameters:
      returnTo - The URL to return the browser to after the flow was completed. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 verificationFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      0 errorGeneric -
    • createBrowserVerificationFlow

      public VerificationFlow createBrowserVerificationFlow​(String returnTo) throws ApiException
      Create Verification Flow for Browser Clients This endpoint initializes a browser-based account verification flow. Once initialized, the browser will be redirected to `selfservice.flows.verification.ui_url` with the flow ID set as the query parameter `?flow=`. If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
      Parameters:
      returnTo - The URL to return the browser to after the flow was completed. (optional)
      Returns:
      VerificationFlow
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 verificationFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      0 errorGeneric -
    • createBrowserVerificationFlowWithHttpInfo

      public ApiResponse<VerificationFlow> createBrowserVerificationFlowWithHttpInfo​(String returnTo) throws ApiException
      Create Verification Flow for Browser Clients This endpoint initializes a browser-based account verification flow. Once initialized, the browser will be redirected to `selfservice.flows.verification.ui_url` with the flow ID set as the query parameter `?flow=`. If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
      Parameters:
      returnTo - The URL to return the browser to after the flow was completed. (optional)
      Returns:
      ApiResponse<VerificationFlow>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 verificationFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      0 errorGeneric -
    • createBrowserVerificationFlowAsync

      public okhttp3.Call createBrowserVerificationFlowAsync​(String returnTo, ApiCallback<VerificationFlow> _callback) throws ApiException
      Create Verification Flow for Browser Clients (asynchronously) This endpoint initializes a browser-based account verification flow. Once initialized, the browser will be redirected to `selfservice.flows.verification.ui_url` with the flow ID set as the query parameter `?flow=`. If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
      Parameters:
      returnTo - The URL to return the browser to after the flow was completed. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 verificationFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      0 errorGeneric -
    • createNativeLoginFlowCall

      public okhttp3.Call createNativeLoginFlowCall​(Boolean refresh, String aal, String xSessionToken, ApiCallback _callback) throws ApiException
      Build call for createNativeLoginFlow
      Parameters:
      refresh - Refresh a login session If set to true, this will refresh an existing login session by asking the user to sign in again. This will reset the authenticated_at time of the session. (optional)
      aal - Request a Specific AuthenticationMethod Assurance Level Use this parameter to upgrade an existing session's authenticator assurance level (AAL). This allows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password, the AAL is 1. If you wish to \"upgrade\" the session's security by asking the user to perform TOTP / WebAuth/ ... you would set this to \"aal2\". (optional)
      xSessionToken - The Session Token of the Identity performing the settings flow. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 loginFlow -
      400 errorGeneric -
      0 errorGeneric -
    • createNativeLoginFlow

      public LoginFlow createNativeLoginFlow​(Boolean refresh, String aal, String xSessionToken) throws ApiException
      Create Login Flow for Native Apps This endpoint initiates a login flow for native apps that do not use a browser, such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set. To fetch an existing login flow call `/self-service/login/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks, including CSRF login attacks. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `session_aal1_required`: Multi-factor auth (e.g. 2fa) was requested but the user has no session yet. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Parameters:
      refresh - Refresh a login session If set to true, this will refresh an existing login session by asking the user to sign in again. This will reset the authenticated_at time of the session. (optional)
      aal - Request a Specific AuthenticationMethod Assurance Level Use this parameter to upgrade an existing session's authenticator assurance level (AAL). This allows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password, the AAL is 1. If you wish to \"upgrade\" the session's security by asking the user to perform TOTP / WebAuth/ ... you would set this to \"aal2\". (optional)
      xSessionToken - The Session Token of the Identity performing the settings flow. (optional)
      Returns:
      LoginFlow
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 loginFlow -
      400 errorGeneric -
      0 errorGeneric -
    • createNativeLoginFlowWithHttpInfo

      public ApiResponse<LoginFlow> createNativeLoginFlowWithHttpInfo​(Boolean refresh, String aal, String xSessionToken) throws ApiException
      Create Login Flow for Native Apps This endpoint initiates a login flow for native apps that do not use a browser, such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set. To fetch an existing login flow call `/self-service/login/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks, including CSRF login attacks. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `session_aal1_required`: Multi-factor auth (e.g. 2fa) was requested but the user has no session yet. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Parameters:
      refresh - Refresh a login session If set to true, this will refresh an existing login session by asking the user to sign in again. This will reset the authenticated_at time of the session. (optional)
      aal - Request a Specific AuthenticationMethod Assurance Level Use this parameter to upgrade an existing session's authenticator assurance level (AAL). This allows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password, the AAL is 1. If you wish to \"upgrade\" the session's security by asking the user to perform TOTP / WebAuth/ ... you would set this to \"aal2\". (optional)
      xSessionToken - The Session Token of the Identity performing the settings flow. (optional)
      Returns:
      ApiResponse<LoginFlow>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 loginFlow -
      400 errorGeneric -
      0 errorGeneric -
    • createNativeLoginFlowAsync

      public okhttp3.Call createNativeLoginFlowAsync​(Boolean refresh, String aal, String xSessionToken, ApiCallback<LoginFlow> _callback) throws ApiException
      Create Login Flow for Native Apps (asynchronously) This endpoint initiates a login flow for native apps that do not use a browser, such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set. To fetch an existing login flow call `/self-service/login/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks, including CSRF login attacks. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `session_aal1_required`: Multi-factor auth (e.g. 2fa) was requested but the user has no session yet. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Parameters:
      refresh - Refresh a login session If set to true, this will refresh an existing login session by asking the user to sign in again. This will reset the authenticated_at time of the session. (optional)
      aal - Request a Specific AuthenticationMethod Assurance Level Use this parameter to upgrade an existing session's authenticator assurance level (AAL). This allows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password, the AAL is 1. If you wish to \"upgrade\" the session's security by asking the user to perform TOTP / WebAuth/ ... you would set this to \"aal2\". (optional)
      xSessionToken - The Session Token of the Identity performing the settings flow. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 loginFlow -
      400 errorGeneric -
      0 errorGeneric -
    • createNativeRecoveryFlowCall

      public okhttp3.Call createNativeRecoveryFlowCall​(ApiCallback _callback) throws ApiException
      Build call for createNativeRecoveryFlow
      Parameters:
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 recoveryFlow -
      400 errorGeneric -
      0 errorGeneric -
    • createNativeRecoveryFlow

      public RecoveryFlow createNativeRecoveryFlow() throws ApiException
      Create Recovery Flow for Native Apps This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error. To fetch an existing recovery flow call `/self-service/recovery/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
      Returns:
      RecoveryFlow
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 recoveryFlow -
      400 errorGeneric -
      0 errorGeneric -
    • createNativeRecoveryFlowWithHttpInfo

      public ApiResponse<RecoveryFlow> createNativeRecoveryFlowWithHttpInfo() throws ApiException
      Create Recovery Flow for Native Apps This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error. To fetch an existing recovery flow call `/self-service/recovery/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
      Returns:
      ApiResponse<RecoveryFlow>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 recoveryFlow -
      400 errorGeneric -
      0 errorGeneric -
    • createNativeRecoveryFlowAsync

      public okhttp3.Call createNativeRecoveryFlowAsync​(ApiCallback<RecoveryFlow> _callback) throws ApiException
      Create Recovery Flow for Native Apps (asynchronously) This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error. To fetch an existing recovery flow call `/self-service/recovery/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
      Parameters:
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 recoveryFlow -
      400 errorGeneric -
      0 errorGeneric -
    • createNativeRegistrationFlowCall

      public okhttp3.Call createNativeRegistrationFlowCall​(ApiCallback _callback) throws ApiException
      Build call for createNativeRegistrationFlow
      Parameters:
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 registrationFlow -
      400 errorGeneric -
      0 errorGeneric -
    • createNativeRegistrationFlow

      public RegistrationFlow createNativeRegistrationFlow() throws ApiException
      Create Registration Flow for Native Apps This endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set. To fetch an existing registration flow call `/self-service/registration/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Returns:
      RegistrationFlow
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 registrationFlow -
      400 errorGeneric -
      0 errorGeneric -
    • createNativeRegistrationFlowWithHttpInfo

      public ApiResponse<RegistrationFlow> createNativeRegistrationFlowWithHttpInfo() throws ApiException
      Create Registration Flow for Native Apps This endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set. To fetch an existing registration flow call `/self-service/registration/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Returns:
      ApiResponse<RegistrationFlow>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 registrationFlow -
      400 errorGeneric -
      0 errorGeneric -
    • createNativeRegistrationFlowAsync

      public okhttp3.Call createNativeRegistrationFlowAsync​(ApiCallback<RegistrationFlow> _callback) throws ApiException
      Create Registration Flow for Native Apps (asynchronously) This endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set. To fetch an existing registration flow call `/self-service/registration/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Parameters:
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 registrationFlow -
      400 errorGeneric -
      0 errorGeneric -
    • createNativeSettingsFlowCall

      public okhttp3.Call createNativeSettingsFlowCall​(String xSessionToken, ApiCallback _callback) throws ApiException
      Build call for createNativeSettingsFlow
      Parameters:
      xSessionToken - The Session Token of the Identity performing the settings flow. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 settingsFlow -
      400 errorGeneric -
      0 errorGeneric -
    • createNativeSettingsFlow

      public SettingsFlow createNativeSettingsFlow​(String xSessionToken) throws ApiException
      Create Settings Flow for Native Apps This endpoint initiates a settings flow for API clients such as mobile devices, smart TVs, and so on. You must provide a valid Ory Kratos Session Token for this endpoint to respond with HTTP 200 OK. To fetch an existing settings flow call `/self-service/settings/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. In the case of an error, the `error.id` of the JSON response body can be one of: `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `session_inactive`: No Ory Session was found - sign in a user first. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
      Parameters:
      xSessionToken - The Session Token of the Identity performing the settings flow. (optional)
      Returns:
      SettingsFlow
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 settingsFlow -
      400 errorGeneric -
      0 errorGeneric -
    • createNativeSettingsFlowWithHttpInfo

      public ApiResponse<SettingsFlow> createNativeSettingsFlowWithHttpInfo​(String xSessionToken) throws ApiException
      Create Settings Flow for Native Apps This endpoint initiates a settings flow for API clients such as mobile devices, smart TVs, and so on. You must provide a valid Ory Kratos Session Token for this endpoint to respond with HTTP 200 OK. To fetch an existing settings flow call `/self-service/settings/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. In the case of an error, the `error.id` of the JSON response body can be one of: `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `session_inactive`: No Ory Session was found - sign in a user first. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
      Parameters:
      xSessionToken - The Session Token of the Identity performing the settings flow. (optional)
      Returns:
      ApiResponse<SettingsFlow>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 settingsFlow -
      400 errorGeneric -
      0 errorGeneric -
    • createNativeSettingsFlowAsync

      public okhttp3.Call createNativeSettingsFlowAsync​(String xSessionToken, ApiCallback<SettingsFlow> _callback) throws ApiException
      Create Settings Flow for Native Apps (asynchronously) This endpoint initiates a settings flow for API clients such as mobile devices, smart TVs, and so on. You must provide a valid Ory Kratos Session Token for this endpoint to respond with HTTP 200 OK. To fetch an existing settings flow call `/self-service/settings/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. In the case of an error, the `error.id` of the JSON response body can be one of: `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `session_inactive`: No Ory Session was found - sign in a user first. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
      Parameters:
      xSessionToken - The Session Token of the Identity performing the settings flow. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 settingsFlow -
      400 errorGeneric -
      0 errorGeneric -
    • createNativeVerificationFlowCall

      public okhttp3.Call createNativeVerificationFlowCall​(ApiCallback _callback) throws ApiException
      Build call for createNativeVerificationFlow
      Parameters:
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 verificationFlow -
      400 errorGeneric -
      0 errorGeneric -
    • createNativeVerificationFlow

      public VerificationFlow createNativeVerificationFlow() throws ApiException
      Create Verification Flow for Native Apps This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call `/self-service/verification/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation).
      Returns:
      VerificationFlow
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 verificationFlow -
      400 errorGeneric -
      0 errorGeneric -
    • createNativeVerificationFlowWithHttpInfo

      public ApiResponse<VerificationFlow> createNativeVerificationFlowWithHttpInfo() throws ApiException
      Create Verification Flow for Native Apps This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call `/self-service/verification/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation).
      Returns:
      ApiResponse<VerificationFlow>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 verificationFlow -
      400 errorGeneric -
      0 errorGeneric -
    • createNativeVerificationFlowAsync

      public okhttp3.Call createNativeVerificationFlowAsync​(ApiCallback<VerificationFlow> _callback) throws ApiException
      Create Verification Flow for Native Apps (asynchronously) This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call `/self-service/verification/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation).
      Parameters:
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 verificationFlow -
      400 errorGeneric -
      0 errorGeneric -
    • disableMyOtherSessionsCall

      public okhttp3.Call disableMyOtherSessionsCall​(String xSessionToken, String cookie, ApiCallback _callback) throws ApiException
      Build call for disableMyOtherSessions
      Parameters:
      xSessionToken - Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional)
      cookie - Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`. It is ok if more than one cookie are included here as all other cookies will be ignored. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 deleteMySessionsCount -
      400 errorGeneric -
      401 errorGeneric -
      0 errorGeneric -
    • disableMyOtherSessions

      public DeleteMySessionsCount disableMyOtherSessions​(String xSessionToken, String cookie) throws ApiException
      Disable my other sessions Calling this endpoint invalidates all except the current session that belong to the logged-in user. Session data are not deleted.
      Parameters:
      xSessionToken - Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional)
      cookie - Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`. It is ok if more than one cookie are included here as all other cookies will be ignored. (optional)
      Returns:
      DeleteMySessionsCount
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 deleteMySessionsCount -
      400 errorGeneric -
      401 errorGeneric -
      0 errorGeneric -
    • disableMyOtherSessionsWithHttpInfo

      public ApiResponse<DeleteMySessionsCount> disableMyOtherSessionsWithHttpInfo​(String xSessionToken, String cookie) throws ApiException
      Disable my other sessions Calling this endpoint invalidates all except the current session that belong to the logged-in user. Session data are not deleted.
      Parameters:
      xSessionToken - Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional)
      cookie - Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`. It is ok if more than one cookie are included here as all other cookies will be ignored. (optional)
      Returns:
      ApiResponse<DeleteMySessionsCount>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 deleteMySessionsCount -
      400 errorGeneric -
      401 errorGeneric -
      0 errorGeneric -
    • disableMyOtherSessionsAsync

      public okhttp3.Call disableMyOtherSessionsAsync​(String xSessionToken, String cookie, ApiCallback<DeleteMySessionsCount> _callback) throws ApiException
      Disable my other sessions (asynchronously) Calling this endpoint invalidates all except the current session that belong to the logged-in user. Session data are not deleted.
      Parameters:
      xSessionToken - Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional)
      cookie - Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`. It is ok if more than one cookie are included here as all other cookies will be ignored. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 deleteMySessionsCount -
      400 errorGeneric -
      401 errorGeneric -
      0 errorGeneric -
    • disableMySessionCall

      public okhttp3.Call disableMySessionCall​(String id, String xSessionToken, String cookie, ApiCallback _callback) throws ApiException
      Build call for disableMySession
      Parameters:
      id - ID is the session's ID. (required)
      xSessionToken - Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional)
      cookie - Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`. It is ok if more than one cookie are included here as all other cookies will be ignored. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 errorGeneric -
      401 errorGeneric -
      0 errorGeneric -
    • disableMySession

      public void disableMySession​(String id, String xSessionToken, String cookie) throws ApiException
      Disable one of my sessions Calling this endpoint invalidates the specified session. The current session cannot be revoked. Session data are not deleted.
      Parameters:
      id - ID is the session's ID. (required)
      xSessionToken - Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional)
      cookie - Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`. It is ok if more than one cookie are included here as all other cookies will be ignored. (optional)
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 errorGeneric -
      401 errorGeneric -
      0 errorGeneric -
    • disableMySessionWithHttpInfo

      public ApiResponse<Void> disableMySessionWithHttpInfo​(String id, String xSessionToken, String cookie) throws ApiException
      Disable one of my sessions Calling this endpoint invalidates the specified session. The current session cannot be revoked. Session data are not deleted.
      Parameters:
      id - ID is the session's ID. (required)
      xSessionToken - Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional)
      cookie - Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`. It is ok if more than one cookie are included here as all other cookies will be ignored. (optional)
      Returns:
      ApiResponse<Void>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 errorGeneric -
      401 errorGeneric -
      0 errorGeneric -
    • disableMySessionAsync

      public okhttp3.Call disableMySessionAsync​(String id, String xSessionToken, String cookie, ApiCallback<Void> _callback) throws ApiException
      Disable one of my sessions (asynchronously) Calling this endpoint invalidates the specified session. The current session cannot be revoked. Session data are not deleted.
      Parameters:
      id - ID is the session's ID. (required)
      xSessionToken - Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional)
      cookie - Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`. It is ok if more than one cookie are included here as all other cookies will be ignored. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 errorGeneric -
      401 errorGeneric -
      0 errorGeneric -
    • getFlowErrorCall

      public okhttp3.Call getFlowErrorCall​(String id, ApiCallback _callback) throws ApiException
      Build call for getFlowError
      Parameters:
      id - Error is the error's ID (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 flowError -
      403 errorGeneric -
      404 errorGeneric -
      500 errorGeneric -
    • getFlowError

      public FlowError getFlowError​(String id) throws ApiException
      Get User-Flow Errors This endpoint returns the error associated with a user-facing self service errors. This endpoint supports stub values to help you implement the error UI: `?id=stub:500` - returns a stub 500 (Internal Server Error) error. More information can be found at [Ory Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).
      Parameters:
      id - Error is the error's ID (required)
      Returns:
      FlowError
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 flowError -
      403 errorGeneric -
      404 errorGeneric -
      500 errorGeneric -
    • getFlowErrorWithHttpInfo

      public ApiResponse<FlowError> getFlowErrorWithHttpInfo​(String id) throws ApiException
      Get User-Flow Errors This endpoint returns the error associated with a user-facing self service errors. This endpoint supports stub values to help you implement the error UI: `?id=stub:500` - returns a stub 500 (Internal Server Error) error. More information can be found at [Ory Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).
      Parameters:
      id - Error is the error's ID (required)
      Returns:
      ApiResponse<FlowError>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 flowError -
      403 errorGeneric -
      404 errorGeneric -
      500 errorGeneric -
    • getFlowErrorAsync

      public okhttp3.Call getFlowErrorAsync​(String id, ApiCallback<FlowError> _callback) throws ApiException
      Get User-Flow Errors (asynchronously) This endpoint returns the error associated with a user-facing self service errors. This endpoint supports stub values to help you implement the error UI: `?id=stub:500` - returns a stub 500 (Internal Server Error) error. More information can be found at [Ory Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).
      Parameters:
      id - Error is the error's ID (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 flowError -
      403 errorGeneric -
      404 errorGeneric -
      500 errorGeneric -
    • getLoginFlowCall

      public okhttp3.Call getLoginFlowCall​(String id, String cookie, ApiCallback _callback) throws ApiException
      Build call for getLoginFlow
      Parameters:
      id - The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). (required)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 loginFlow -
      403 errorGeneric -
      404 errorGeneric -
      410 errorGeneric -
      0 errorGeneric -
    • getLoginFlow

      public LoginFlow getLoginFlow​(String id, String cookie) throws ApiException
      Get Login Flow This endpoint returns a login flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/login', async function (req, res) { const flow = await client.getLoginFlow(req.header('cookie'), req.query['flow']) res.render('login', flow) }) ``` This request may fail due to several reasons. The `error.id` can be one of: `session_already_available`: The user is already signed in. `self_service_flow_expired`: The flow is expired and you should request a new one. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Parameters:
      id - The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). (required)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      Returns:
      LoginFlow
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 loginFlow -
      403 errorGeneric -
      404 errorGeneric -
      410 errorGeneric -
      0 errorGeneric -
    • getLoginFlowWithHttpInfo

      public ApiResponse<LoginFlow> getLoginFlowWithHttpInfo​(String id, String cookie) throws ApiException
      Get Login Flow This endpoint returns a login flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/login', async function (req, res) { const flow = await client.getLoginFlow(req.header('cookie'), req.query['flow']) res.render('login', flow) }) ``` This request may fail due to several reasons. The `error.id` can be one of: `session_already_available`: The user is already signed in. `self_service_flow_expired`: The flow is expired and you should request a new one. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Parameters:
      id - The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). (required)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      Returns:
      ApiResponse<LoginFlow>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 loginFlow -
      403 errorGeneric -
      404 errorGeneric -
      410 errorGeneric -
      0 errorGeneric -
    • getLoginFlowAsync

      public okhttp3.Call getLoginFlowAsync​(String id, String cookie, ApiCallback<LoginFlow> _callback) throws ApiException
      Get Login Flow (asynchronously) This endpoint returns a login flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/login', async function (req, res) { const flow = await client.getLoginFlow(req.header('cookie'), req.query['flow']) res.render('login', flow) }) ``` This request may fail due to several reasons. The `error.id` can be one of: `session_already_available`: The user is already signed in. `self_service_flow_expired`: The flow is expired and you should request a new one. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Parameters:
      id - The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). (required)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 loginFlow -
      403 errorGeneric -
      404 errorGeneric -
      410 errorGeneric -
      0 errorGeneric -
    • getRecoveryFlowCall

      public okhttp3.Call getRecoveryFlowCall​(String id, String cookie, ApiCallback _callback) throws ApiException
      Build call for getRecoveryFlow
      Parameters:
      id - The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). (required)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 recoveryFlow -
      404 errorGeneric -
      410 errorGeneric -
      0 errorGeneric -
    • getRecoveryFlow

      public RecoveryFlow getRecoveryFlow​(String id, String cookie) throws ApiException
      Get Recovery Flow This endpoint returns a recovery flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/recovery', async function (req, res) { const flow = await client.getRecoveryFlow(req.header('Cookie'), req.query['flow']) res.render('recovery', flow) }) ``` More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
      Parameters:
      id - The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). (required)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      Returns:
      RecoveryFlow
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 recoveryFlow -
      404 errorGeneric -
      410 errorGeneric -
      0 errorGeneric -
    • getRecoveryFlowWithHttpInfo

      public ApiResponse<RecoveryFlow> getRecoveryFlowWithHttpInfo​(String id, String cookie) throws ApiException
      Get Recovery Flow This endpoint returns a recovery flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/recovery', async function (req, res) { const flow = await client.getRecoveryFlow(req.header('Cookie'), req.query['flow']) res.render('recovery', flow) }) ``` More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
      Parameters:
      id - The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). (required)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      Returns:
      ApiResponse<RecoveryFlow>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 recoveryFlow -
      404 errorGeneric -
      410 errorGeneric -
      0 errorGeneric -
    • getRecoveryFlowAsync

      public okhttp3.Call getRecoveryFlowAsync​(String id, String cookie, ApiCallback<RecoveryFlow> _callback) throws ApiException
      Get Recovery Flow (asynchronously) This endpoint returns a recovery flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/recovery', async function (req, res) { const flow = await client.getRecoveryFlow(req.header('Cookie'), req.query['flow']) res.render('recovery', flow) }) ``` More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
      Parameters:
      id - The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). (required)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 recoveryFlow -
      404 errorGeneric -
      410 errorGeneric -
      0 errorGeneric -
    • getRegistrationFlowCall

      public okhttp3.Call getRegistrationFlowCall​(String id, String cookie, ApiCallback _callback) throws ApiException
      Build call for getRegistrationFlow
      Parameters:
      id - The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). (required)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 registrationFlow -
      403 errorGeneric -
      404 errorGeneric -
      410 errorGeneric -
      0 errorGeneric -
    • getRegistrationFlow

      public RegistrationFlow getRegistrationFlow​(String id, String cookie) throws ApiException
      Get Registration Flow This endpoint returns a registration flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/registration', async function (req, res) { const flow = await client.getRegistrationFlow(req.header('cookie'), req.query['flow']) res.render('registration', flow) }) ``` This request may fail due to several reasons. The `error.id` can be one of: `session_already_available`: The user is already signed in. `self_service_flow_expired`: The flow is expired and you should request a new one. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Parameters:
      id - The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). (required)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      Returns:
      RegistrationFlow
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 registrationFlow -
      403 errorGeneric -
      404 errorGeneric -
      410 errorGeneric -
      0 errorGeneric -
    • getRegistrationFlowWithHttpInfo

      public ApiResponse<RegistrationFlow> getRegistrationFlowWithHttpInfo​(String id, String cookie) throws ApiException
      Get Registration Flow This endpoint returns a registration flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/registration', async function (req, res) { const flow = await client.getRegistrationFlow(req.header('cookie'), req.query['flow']) res.render('registration', flow) }) ``` This request may fail due to several reasons. The `error.id` can be one of: `session_already_available`: The user is already signed in. `self_service_flow_expired`: The flow is expired and you should request a new one. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Parameters:
      id - The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). (required)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      Returns:
      ApiResponse<RegistrationFlow>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 registrationFlow -
      403 errorGeneric -
      404 errorGeneric -
      410 errorGeneric -
      0 errorGeneric -
    • getRegistrationFlowAsync

      public okhttp3.Call getRegistrationFlowAsync​(String id, String cookie, ApiCallback<RegistrationFlow> _callback) throws ApiException
      Get Registration Flow (asynchronously) This endpoint returns a registration flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/registration', async function (req, res) { const flow = await client.getRegistrationFlow(req.header('cookie'), req.query['flow']) res.render('registration', flow) }) ``` This request may fail due to several reasons. The `error.id` can be one of: `session_already_available`: The user is already signed in. `self_service_flow_expired`: The flow is expired and you should request a new one. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Parameters:
      id - The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). (required)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 registrationFlow -
      403 errorGeneric -
      404 errorGeneric -
      410 errorGeneric -
      0 errorGeneric -
    • getSettingsFlowCall

      public okhttp3.Call getSettingsFlowCall​(String id, String xSessionToken, String cookie, ApiCallback _callback) throws ApiException
      Build call for getSettingsFlow
      Parameters:
      id - ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). (required)
      xSessionToken - The Session Token When using the SDK in an app without a browser, please include the session token here. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 settingsFlow -
      401 errorGeneric -
      403 errorGeneric -
      404 errorGeneric -
      410 errorGeneric -
      0 errorGeneric -
    • getSettingsFlow

      public SettingsFlow getSettingsFlow​(String id, String xSessionToken, String cookie) throws ApiException
      Get Settings Flow When accessing this endpoint through Ory Kratos' Public API you must ensure that either the Ory Kratos Session Cookie or the Ory Kratos Session Token are set. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. You can access this endpoint without credentials when using Ory Kratos' Admin API. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `session_inactive`: No Ory Session was found - sign in a user first. `security_identity_mismatch`: The flow was interrupted with `session_refresh_required` but apparently some other identity logged in instead. More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
      Parameters:
      id - ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). (required)
      xSessionToken - The Session Token When using the SDK in an app without a browser, please include the session token here. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      Returns:
      SettingsFlow
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 settingsFlow -
      401 errorGeneric -
      403 errorGeneric -
      404 errorGeneric -
      410 errorGeneric -
      0 errorGeneric -
    • getSettingsFlowWithHttpInfo

      public ApiResponse<SettingsFlow> getSettingsFlowWithHttpInfo​(String id, String xSessionToken, String cookie) throws ApiException
      Get Settings Flow When accessing this endpoint through Ory Kratos' Public API you must ensure that either the Ory Kratos Session Cookie or the Ory Kratos Session Token are set. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. You can access this endpoint without credentials when using Ory Kratos' Admin API. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `session_inactive`: No Ory Session was found - sign in a user first. `security_identity_mismatch`: The flow was interrupted with `session_refresh_required` but apparently some other identity logged in instead. More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
      Parameters:
      id - ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). (required)
      xSessionToken - The Session Token When using the SDK in an app without a browser, please include the session token here. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      Returns:
      ApiResponse<SettingsFlow>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 settingsFlow -
      401 errorGeneric -
      403 errorGeneric -
      404 errorGeneric -
      410 errorGeneric -
      0 errorGeneric -
    • getSettingsFlowAsync

      public okhttp3.Call getSettingsFlowAsync​(String id, String xSessionToken, String cookie, ApiCallback<SettingsFlow> _callback) throws ApiException
      Get Settings Flow (asynchronously) When accessing this endpoint through Ory Kratos' Public API you must ensure that either the Ory Kratos Session Cookie or the Ory Kratos Session Token are set. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. You can access this endpoint without credentials when using Ory Kratos' Admin API. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `session_inactive`: No Ory Session was found - sign in a user first. `security_identity_mismatch`: The flow was interrupted with `session_refresh_required` but apparently some other identity logged in instead. More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
      Parameters:
      id - ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). (required)
      xSessionToken - The Session Token When using the SDK in an app without a browser, please include the session token here. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 settingsFlow -
      401 errorGeneric -
      403 errorGeneric -
      404 errorGeneric -
      410 errorGeneric -
      0 errorGeneric -
    • getVerificationFlowCall

      public okhttp3.Call getVerificationFlowCall​(String id, String cookie, ApiCallback _callback) throws ApiException
      Build call for getVerificationFlow
      Parameters:
      id - The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). (required)
      cookie - HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 verificationFlow -
      403 errorGeneric -
      404 errorGeneric -
      0 errorGeneric -
    • getVerificationFlow

      public VerificationFlow getVerificationFlow​(String id, String cookie) throws ApiException
      Get Verification Flow This endpoint returns a verification flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/recovery', async function (req, res) { const flow = await client.getVerificationFlow(req.header('cookie'), req.query['flow']) res.render('verification', flow) }) More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
      Parameters:
      id - The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). (required)
      cookie - HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. (optional)
      Returns:
      VerificationFlow
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 verificationFlow -
      403 errorGeneric -
      404 errorGeneric -
      0 errorGeneric -
    • getVerificationFlowWithHttpInfo

      public ApiResponse<VerificationFlow> getVerificationFlowWithHttpInfo​(String id, String cookie) throws ApiException
      Get Verification Flow This endpoint returns a verification flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/recovery', async function (req, res) { const flow = await client.getVerificationFlow(req.header('cookie'), req.query['flow']) res.render('verification', flow) }) More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
      Parameters:
      id - The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). (required)
      cookie - HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. (optional)
      Returns:
      ApiResponse<VerificationFlow>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 verificationFlow -
      403 errorGeneric -
      404 errorGeneric -
      0 errorGeneric -
    • getVerificationFlowAsync

      public okhttp3.Call getVerificationFlowAsync​(String id, String cookie, ApiCallback<VerificationFlow> _callback) throws ApiException
      Get Verification Flow (asynchronously) This endpoint returns a verification flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/recovery', async function (req, res) { const flow = await client.getVerificationFlow(req.header('cookie'), req.query['flow']) res.render('verification', flow) }) More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
      Parameters:
      id - The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). (required)
      cookie - HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 verificationFlow -
      403 errorGeneric -
      404 errorGeneric -
      0 errorGeneric -
    • getWebAuthnJavaScriptCall

      public okhttp3.Call getWebAuthnJavaScriptCall​(ApiCallback _callback) throws ApiException
      Build call for getWebAuthnJavaScript
      Parameters:
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 webAuthnJavaScript -
    • getWebAuthnJavaScript

      public String getWebAuthnJavaScript() throws ApiException
      Get WebAuthn JavaScript This endpoint provides JavaScript which is needed in order to perform WebAuthn login and registration. If you are building a JavaScript Browser App (e.g. in ReactJS or AngularJS) you will need to load this file: ```html <script src=\"https://public-kratos.example.org/.well-known/ory/webauthn.js\" type=\"script\" async /> ``` More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Returns:
      String
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 webAuthnJavaScript -
    • getWebAuthnJavaScriptWithHttpInfo

      public ApiResponse<String> getWebAuthnJavaScriptWithHttpInfo() throws ApiException
      Get WebAuthn JavaScript This endpoint provides JavaScript which is needed in order to perform WebAuthn login and registration. If you are building a JavaScript Browser App (e.g. in ReactJS or AngularJS) you will need to load this file: ```html <script src=\"https://public-kratos.example.org/.well-known/ory/webauthn.js\" type=\"script\" async /> ``` More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Returns:
      ApiResponse<String>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 webAuthnJavaScript -
    • getWebAuthnJavaScriptAsync

      public okhttp3.Call getWebAuthnJavaScriptAsync​(ApiCallback<String> _callback) throws ApiException
      Get WebAuthn JavaScript (asynchronously) This endpoint provides JavaScript which is needed in order to perform WebAuthn login and registration. If you are building a JavaScript Browser App (e.g. in ReactJS or AngularJS) you will need to load this file: ```html <script src=\"https://public-kratos.example.org/.well-known/ory/webauthn.js\" type=\"script\" async /> ``` More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Parameters:
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 webAuthnJavaScript -
    • listMySessionsCall

      public okhttp3.Call listMySessionsCall​(Long perPage, Long page, String xSessionToken, String cookie, ApiCallback _callback) throws ApiException
      Build call for listMySessions
      Parameters:
      perPage - Items per Page This is the number of items per page. (optional, default to 250)
      page - Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. (optional, default to 1)
      xSessionToken - Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional)
      cookie - Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`. It is ok if more than one cookie are included here as all other cookies will be ignored. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 List My Session Response -
      400 errorGeneric -
      401 errorGeneric -
      0 errorGeneric -
    • listMySessions

      public List<Session> listMySessions​(Long perPage, Long page, String xSessionToken, String cookie) throws ApiException
      Get My Active Sessions This endpoints returns all other active sessions that belong to the logged-in user. The current session can be retrieved by calling the `/sessions/whoami` endpoint.
      Parameters:
      perPage - Items per Page This is the number of items per page. (optional, default to 250)
      page - Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. (optional, default to 1)
      xSessionToken - Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional)
      cookie - Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`. It is ok if more than one cookie are included here as all other cookies will be ignored. (optional)
      Returns:
      List<Session>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 List My Session Response -
      400 errorGeneric -
      401 errorGeneric -
      0 errorGeneric -
    • listMySessionsWithHttpInfo

      public ApiResponse<List<Session>> listMySessionsWithHttpInfo​(Long perPage, Long page, String xSessionToken, String cookie) throws ApiException
      Get My Active Sessions This endpoints returns all other active sessions that belong to the logged-in user. The current session can be retrieved by calling the `/sessions/whoami` endpoint.
      Parameters:
      perPage - Items per Page This is the number of items per page. (optional, default to 250)
      page - Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. (optional, default to 1)
      xSessionToken - Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional)
      cookie - Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`. It is ok if more than one cookie are included here as all other cookies will be ignored. (optional)
      Returns:
      ApiResponse<List<Session>>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 List My Session Response -
      400 errorGeneric -
      401 errorGeneric -
      0 errorGeneric -
    • listMySessionsAsync

      public okhttp3.Call listMySessionsAsync​(Long perPage, Long page, String xSessionToken, String cookie, ApiCallback<List<Session>> _callback) throws ApiException
      Get My Active Sessions (asynchronously) This endpoints returns all other active sessions that belong to the logged-in user. The current session can be retrieved by calling the `/sessions/whoami` endpoint.
      Parameters:
      perPage - Items per Page This is the number of items per page. (optional, default to 250)
      page - Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. (optional, default to 1)
      xSessionToken - Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional)
      cookie - Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`. It is ok if more than one cookie are included here as all other cookies will be ignored. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 List My Session Response -
      400 errorGeneric -
      401 errorGeneric -
      0 errorGeneric -
    • performNativeLogoutCall

      public okhttp3.Call performNativeLogoutCall​(PerformNativeLogoutBody performNativeLogoutBody, ApiCallback _callback) throws ApiException
      Build call for performNativeLogout
      Parameters:
      performNativeLogoutBody - (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 errorGeneric -
      0 errorGeneric -
    • performNativeLogout

      public void performNativeLogout​(PerformNativeLogoutBody performNativeLogoutBody) throws ApiException
      Perform Logout for Native Apps Use this endpoint to log out an identity using an Ory Session Token. If the Ory Session Token was successfully revoked, the server returns a 204 No Content response. A 204 No Content response is also sent when the Ory Session Token has been revoked already before. If the Ory Session Token is malformed or does not exist a 403 Forbidden response will be returned. This endpoint does not remove any HTTP Cookies - use the Browser-Based Self-Service Logout Flow instead.
      Parameters:
      performNativeLogoutBody - (required)
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 errorGeneric -
      0 errorGeneric -
    • performNativeLogoutWithHttpInfo

      public ApiResponse<Void> performNativeLogoutWithHttpInfo​(PerformNativeLogoutBody performNativeLogoutBody) throws ApiException
      Perform Logout for Native Apps Use this endpoint to log out an identity using an Ory Session Token. If the Ory Session Token was successfully revoked, the server returns a 204 No Content response. A 204 No Content response is also sent when the Ory Session Token has been revoked already before. If the Ory Session Token is malformed or does not exist a 403 Forbidden response will be returned. This endpoint does not remove any HTTP Cookies - use the Browser-Based Self-Service Logout Flow instead.
      Parameters:
      performNativeLogoutBody - (required)
      Returns:
      ApiResponse<Void>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 errorGeneric -
      0 errorGeneric -
    • performNativeLogoutAsync

      public okhttp3.Call performNativeLogoutAsync​(PerformNativeLogoutBody performNativeLogoutBody, ApiCallback<Void> _callback) throws ApiException
      Perform Logout for Native Apps (asynchronously) Use this endpoint to log out an identity using an Ory Session Token. If the Ory Session Token was successfully revoked, the server returns a 204 No Content response. A 204 No Content response is also sent when the Ory Session Token has been revoked already before. If the Ory Session Token is malformed or does not exist a 403 Forbidden response will be returned. This endpoint does not remove any HTTP Cookies - use the Browser-Based Self-Service Logout Flow instead.
      Parameters:
      performNativeLogoutBody - (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 errorGeneric -
      0 errorGeneric -
    • toSessionCall

      public okhttp3.Call toSessionCall​(String xSessionToken, String cookie, ApiCallback _callback) throws ApiException
      Build call for toSession
      Parameters:
      xSessionToken - Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional)
      cookie - Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`. It is ok if more than one cookie are included here as all other cookies will be ignored. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 session -
      401 errorGeneric -
      403 errorGeneric -
      0 errorGeneric -
    • toSession

      public Session toSession​(String xSessionToken, String cookie) throws ApiException
      Check Who the Current HTTP Session Belongs To Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated. Returns a session object in the body or 401 if the credentials are invalid or no credentials were sent. When the request it successful it adds the user ID to the 'X-Kratos-Authenticated-Identity-Id' header in the response. If you call this endpoint from a server-side application, you must forward the HTTP Cookie Header to this endpoint: ```js pseudo-code example router.get('/protected-endpoint', async function (req, res) { const session = await client.toSession(undefined, req.header('cookie')) console.log(session) }) ``` When calling this endpoint from a non-browser application (e.g. mobile app) you must include the session token: ```js pseudo-code example ... const session = await client.toSession(\"the-session-token\") console.log(session) ``` Depending on your configuration this endpoint might return a 403 status code if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. This endpoint is useful for: AJAX calls. Remember to send credentials and set up CORS correctly! Reverse proxies and API Gateways Server-side calls - use the `X-Session-Token` header! This endpoint authenticates users by checking: if the `Cookie` HTTP header was set containing an Ory Kratos Session Cookie; if the `Authorization: bearer <ory-session-token>` HTTP header was set with a valid Ory Kratos Session Token; if the `X-Session-Token` HTTP header was set with a valid Ory Kratos Session Token. If none of these headers are set or the cooke or token are invalid, the endpoint returns a HTTP 401 status code. As explained above, this request may fail due to several reasons. The `error.id` can be one of: `session_inactive`: No active session was found in the request (e.g. no Ory Session Cookie / Ory Session Token). `session_aal2_required`: An active session was found but it does not fulfil the Authenticator Assurance Level, implying that the session must (e.g.) authenticate the second factor.
      Parameters:
      xSessionToken - Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional)
      cookie - Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`. It is ok if more than one cookie are included here as all other cookies will be ignored. (optional)
      Returns:
      Session
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 session -
      401 errorGeneric -
      403 errorGeneric -
      0 errorGeneric -
    • toSessionWithHttpInfo

      public ApiResponse<Session> toSessionWithHttpInfo​(String xSessionToken, String cookie) throws ApiException
      Check Who the Current HTTP Session Belongs To Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated. Returns a session object in the body or 401 if the credentials are invalid or no credentials were sent. When the request it successful it adds the user ID to the 'X-Kratos-Authenticated-Identity-Id' header in the response. If you call this endpoint from a server-side application, you must forward the HTTP Cookie Header to this endpoint: ```js pseudo-code example router.get('/protected-endpoint', async function (req, res) { const session = await client.toSession(undefined, req.header('cookie')) console.log(session) }) ``` When calling this endpoint from a non-browser application (e.g. mobile app) you must include the session token: ```js pseudo-code example ... const session = await client.toSession(\"the-session-token\") console.log(session) ``` Depending on your configuration this endpoint might return a 403 status code if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. This endpoint is useful for: AJAX calls. Remember to send credentials and set up CORS correctly! Reverse proxies and API Gateways Server-side calls - use the `X-Session-Token` header! This endpoint authenticates users by checking: if the `Cookie` HTTP header was set containing an Ory Kratos Session Cookie; if the `Authorization: bearer <ory-session-token>` HTTP header was set with a valid Ory Kratos Session Token; if the `X-Session-Token` HTTP header was set with a valid Ory Kratos Session Token. If none of these headers are set or the cooke or token are invalid, the endpoint returns a HTTP 401 status code. As explained above, this request may fail due to several reasons. The `error.id` can be one of: `session_inactive`: No active session was found in the request (e.g. no Ory Session Cookie / Ory Session Token). `session_aal2_required`: An active session was found but it does not fulfil the Authenticator Assurance Level, implying that the session must (e.g.) authenticate the second factor.
      Parameters:
      xSessionToken - Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional)
      cookie - Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`. It is ok if more than one cookie are included here as all other cookies will be ignored. (optional)
      Returns:
      ApiResponse<Session>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 session -
      401 errorGeneric -
      403 errorGeneric -
      0 errorGeneric -
    • toSessionAsync

      public okhttp3.Call toSessionAsync​(String xSessionToken, String cookie, ApiCallback<Session> _callback) throws ApiException
      Check Who the Current HTTP Session Belongs To (asynchronously) Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated. Returns a session object in the body or 401 if the credentials are invalid or no credentials were sent. When the request it successful it adds the user ID to the 'X-Kratos-Authenticated-Identity-Id' header in the response. If you call this endpoint from a server-side application, you must forward the HTTP Cookie Header to this endpoint: ```js pseudo-code example router.get('/protected-endpoint', async function (req, res) { const session = await client.toSession(undefined, req.header('cookie')) console.log(session) }) ``` When calling this endpoint from a non-browser application (e.g. mobile app) you must include the session token: ```js pseudo-code example ... const session = await client.toSession(\"the-session-token\") console.log(session) ``` Depending on your configuration this endpoint might return a 403 status code if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. This endpoint is useful for: AJAX calls. Remember to send credentials and set up CORS correctly! Reverse proxies and API Gateways Server-side calls - use the `X-Session-Token` header! This endpoint authenticates users by checking: if the `Cookie` HTTP header was set containing an Ory Kratos Session Cookie; if the `Authorization: bearer <ory-session-token>` HTTP header was set with a valid Ory Kratos Session Token; if the `X-Session-Token` HTTP header was set with a valid Ory Kratos Session Token. If none of these headers are set or the cooke or token are invalid, the endpoint returns a HTTP 401 status code. As explained above, this request may fail due to several reasons. The `error.id` can be one of: `session_inactive`: No active session was found in the request (e.g. no Ory Session Cookie / Ory Session Token). `session_aal2_required`: An active session was found but it does not fulfil the Authenticator Assurance Level, implying that the session must (e.g.) authenticate the second factor.
      Parameters:
      xSessionToken - Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional)
      cookie - Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`. It is ok if more than one cookie are included here as all other cookies will be ignored. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 session -
      401 errorGeneric -
      403 errorGeneric -
      0 errorGeneric -
    • updateLoginFlowCall

      public okhttp3.Call updateLoginFlowCall​(String flow, UpdateLoginFlowBody updateLoginFlowBody, String xSessionToken, String cookie, ApiCallback _callback) throws ApiException
      Build call for updateLoginFlow
      Parameters:
      flow - The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). (required)
      updateLoginFlowBody - (required)
      xSessionToken - The Session Token of the Identity performing the settings flow. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 successfulNativeLogin -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 loginFlow -
      410 errorGeneric -
      422 errorBrowserLocationChangeRequired -
      0 errorGeneric -
    • updateLoginFlow

      public SuccessfulNativeLogin updateLoginFlow​(String flow, UpdateLoginFlowBody updateLoginFlowBody, String xSessionToken, String cookie) throws ApiException
      Submit a Login Flow :::info This endpoint is EXPERIMENTAL and subject to potential breaking changes in the future. ::: Use this endpoint to complete a login flow. This endpoint behaves differently for API and browser flows. API flows expect `application/json` to be sent in the body and responds with HTTP 200 and a application/json body with the session token on success; HTTP 410 if the original flow expired with the appropriate error messages set and optionally a `use_flow_id` parameter in the body; HTTP 400 on form validation errors. Browser flows expect a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond with a HTTP 303 redirect to the post/after login URL or the `return_to` value if it was set and if the login succeeded; a HTTP 303 redirect to the login UI URL with the flow ID containing the validation errors otherwise. Browser flows with an accept header of `application/json` will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. If this endpoint is called with `Accept: application/json` in the header, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Parameters:
      flow - The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). (required)
      updateLoginFlowBody - (required)
      xSessionToken - The Session Token of the Identity performing the settings flow. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      Returns:
      SuccessfulNativeLogin
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 successfulNativeLogin -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 loginFlow -
      410 errorGeneric -
      422 errorBrowserLocationChangeRequired -
      0 errorGeneric -
    • updateLoginFlowWithHttpInfo

      public ApiResponse<SuccessfulNativeLogin> updateLoginFlowWithHttpInfo​(String flow, UpdateLoginFlowBody updateLoginFlowBody, String xSessionToken, String cookie) throws ApiException
      Submit a Login Flow :::info This endpoint is EXPERIMENTAL and subject to potential breaking changes in the future. ::: Use this endpoint to complete a login flow. This endpoint behaves differently for API and browser flows. API flows expect `application/json` to be sent in the body and responds with HTTP 200 and a application/json body with the session token on success; HTTP 410 if the original flow expired with the appropriate error messages set and optionally a `use_flow_id` parameter in the body; HTTP 400 on form validation errors. Browser flows expect a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond with a HTTP 303 redirect to the post/after login URL or the `return_to` value if it was set and if the login succeeded; a HTTP 303 redirect to the login UI URL with the flow ID containing the validation errors otherwise. Browser flows with an accept header of `application/json` will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. If this endpoint is called with `Accept: application/json` in the header, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Parameters:
      flow - The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). (required)
      updateLoginFlowBody - (required)
      xSessionToken - The Session Token of the Identity performing the settings flow. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      Returns:
      ApiResponse<SuccessfulNativeLogin>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 successfulNativeLogin -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 loginFlow -
      410 errorGeneric -
      422 errorBrowserLocationChangeRequired -
      0 errorGeneric -
    • updateLoginFlowAsync

      public okhttp3.Call updateLoginFlowAsync​(String flow, UpdateLoginFlowBody updateLoginFlowBody, String xSessionToken, String cookie, ApiCallback<SuccessfulNativeLogin> _callback) throws ApiException
      Submit a Login Flow (asynchronously) :::info This endpoint is EXPERIMENTAL and subject to potential breaking changes in the future. ::: Use this endpoint to complete a login flow. This endpoint behaves differently for API and browser flows. API flows expect `application/json` to be sent in the body and responds with HTTP 200 and a application/json body with the session token on success; HTTP 410 if the original flow expired with the appropriate error messages set and optionally a `use_flow_id` parameter in the body; HTTP 400 on form validation errors. Browser flows expect a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond with a HTTP 303 redirect to the post/after login URL or the `return_to` value if it was set and if the login succeeded; a HTTP 303 redirect to the login UI URL with the flow ID containing the validation errors otherwise. Browser flows with an accept header of `application/json` will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. If this endpoint is called with `Accept: application/json` in the header, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Parameters:
      flow - The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). (required)
      updateLoginFlowBody - (required)
      xSessionToken - The Session Token of the Identity performing the settings flow. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 successfulNativeLogin -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 loginFlow -
      410 errorGeneric -
      422 errorBrowserLocationChangeRequired -
      0 errorGeneric -
    • updateLogoutFlowCall

      public okhttp3.Call updateLogoutFlowCall​(String token, String returnTo, ApiCallback _callback) throws ApiException
      Build call for updateLogoutFlow
      Parameters:
      token - A Valid Logout Token If you do not have a logout token because you only have a session cookie, call `/self-service/logout/browser` to generate a URL for this endpoint. (optional)
      returnTo - The URL to return to after the logout was completed. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      0 errorGeneric -
    • updateLogoutFlow

      public void updateLogoutFlow​(String token, String returnTo) throws ApiException
      Update Logout Flow This endpoint logs out an identity in a self-service manner. If the `Accept` HTTP header is not set to `application/json`, the browser will be redirected (HTTP 303 See Other) to the `return_to` parameter of the initial request or fall back to `urls.default_return_to`. If the `Accept` HTTP header is set to `application/json`, a 204 No Content response will be sent on successful logout instead. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). For API clients you can call the `/self-service/logout/api` URL directly with the Ory Session Token. More information can be found at [Ory Kratos User Logout Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-logout).
      Parameters:
      token - A Valid Logout Token If you do not have a logout token because you only have a session cookie, call `/self-service/logout/browser` to generate a URL for this endpoint. (optional)
      returnTo - The URL to return to after the logout was completed. (optional)
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      0 errorGeneric -
    • updateLogoutFlowWithHttpInfo

      public ApiResponse<Void> updateLogoutFlowWithHttpInfo​(String token, String returnTo) throws ApiException
      Update Logout Flow This endpoint logs out an identity in a self-service manner. If the `Accept` HTTP header is not set to `application/json`, the browser will be redirected (HTTP 303 See Other) to the `return_to` parameter of the initial request or fall back to `urls.default_return_to`. If the `Accept` HTTP header is set to `application/json`, a 204 No Content response will be sent on successful logout instead. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). For API clients you can call the `/self-service/logout/api` URL directly with the Ory Session Token. More information can be found at [Ory Kratos User Logout Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-logout).
      Parameters:
      token - A Valid Logout Token If you do not have a logout token because you only have a session cookie, call `/self-service/logout/browser` to generate a URL for this endpoint. (optional)
      returnTo - The URL to return to after the logout was completed. (optional)
      Returns:
      ApiResponse<Void>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      0 errorGeneric -
    • updateLogoutFlowAsync

      public okhttp3.Call updateLogoutFlowAsync​(String token, String returnTo, ApiCallback<Void> _callback) throws ApiException
      Update Logout Flow (asynchronously) This endpoint logs out an identity in a self-service manner. If the `Accept` HTTP header is not set to `application/json`, the browser will be redirected (HTTP 303 See Other) to the `return_to` parameter of the initial request or fall back to `urls.default_return_to`. If the `Accept` HTTP header is set to `application/json`, a 204 No Content response will be sent on successful logout instead. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). For API clients you can call the `/self-service/logout/api` URL directly with the Ory Session Token. More information can be found at [Ory Kratos User Logout Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-logout).
      Parameters:
      token - A Valid Logout Token If you do not have a logout token because you only have a session cookie, call `/self-service/logout/browser` to generate a URL for this endpoint. (optional)
      returnTo - The URL to return to after the logout was completed. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      0 errorGeneric -
    • updateRecoveryFlowCall

      public okhttp3.Call updateRecoveryFlowCall​(String flow, UpdateRecoveryFlowBody updateRecoveryFlowBody, String token, String cookie, ApiCallback _callback) throws ApiException
      Build call for updateRecoveryFlow
      Parameters:
      flow - The Recovery Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). (required)
      updateRecoveryFlowBody - (required)
      token - Recovery Token The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 recoveryFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 recoveryFlow -
      410 errorGeneric -
      422 errorBrowserLocationChangeRequired -
      0 errorGeneric -
    • updateRecoveryFlow

      public RecoveryFlow updateRecoveryFlow​(String flow, UpdateRecoveryFlowBody updateRecoveryFlowBody, String token, String cookie) throws ApiException
      Complete Recovery Flow Use this endpoint to complete a recovery flow. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid. and a HTTP 303 See Other redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired). For Browser clients without HTTP Header `Accept` or with `Accept: text/_*` it returns a HTTP 303 See Other redirect to the Recovery UI URL with the Recovery Flow ID appended. `sent_email` is the success state after `choose_method` for the `link` method and allows the user to request another recovery email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a recovery link\") does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with a new Recovery Flow ID which contains an error message that the recovery link was invalid. More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
      Parameters:
      flow - The Recovery Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). (required)
      updateRecoveryFlowBody - (required)
      token - Recovery Token The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      Returns:
      RecoveryFlow
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 recoveryFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 recoveryFlow -
      410 errorGeneric -
      422 errorBrowserLocationChangeRequired -
      0 errorGeneric -
    • updateRecoveryFlowWithHttpInfo

      public ApiResponse<RecoveryFlow> updateRecoveryFlowWithHttpInfo​(String flow, UpdateRecoveryFlowBody updateRecoveryFlowBody, String token, String cookie) throws ApiException
      Complete Recovery Flow Use this endpoint to complete a recovery flow. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid. and a HTTP 303 See Other redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired). For Browser clients without HTTP Header `Accept` or with `Accept: text/_*` it returns a HTTP 303 See Other redirect to the Recovery UI URL with the Recovery Flow ID appended. `sent_email` is the success state after `choose_method` for the `link` method and allows the user to request another recovery email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a recovery link\") does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with a new Recovery Flow ID which contains an error message that the recovery link was invalid. More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
      Parameters:
      flow - The Recovery Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). (required)
      updateRecoveryFlowBody - (required)
      token - Recovery Token The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      Returns:
      ApiResponse<RecoveryFlow>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 recoveryFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 recoveryFlow -
      410 errorGeneric -
      422 errorBrowserLocationChangeRequired -
      0 errorGeneric -
    • updateRecoveryFlowAsync

      public okhttp3.Call updateRecoveryFlowAsync​(String flow, UpdateRecoveryFlowBody updateRecoveryFlowBody, String token, String cookie, ApiCallback<RecoveryFlow> _callback) throws ApiException
      Complete Recovery Flow (asynchronously) Use this endpoint to complete a recovery flow. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid. and a HTTP 303 See Other redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired). For Browser clients without HTTP Header `Accept` or with `Accept: text/_*` it returns a HTTP 303 See Other redirect to the Recovery UI URL with the Recovery Flow ID appended. `sent_email` is the success state after `choose_method` for the `link` method and allows the user to request another recovery email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a recovery link\") does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with a new Recovery Flow ID which contains an error message that the recovery link was invalid. More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
      Parameters:
      flow - The Recovery Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). (required)
      updateRecoveryFlowBody - (required)
      token - Recovery Token The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 recoveryFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 recoveryFlow -
      410 errorGeneric -
      422 errorBrowserLocationChangeRequired -
      0 errorGeneric -
    • updateRegistrationFlowCall

      public okhttp3.Call updateRegistrationFlowCall​(String flow, UpdateRegistrationFlowBody updateRegistrationFlowBody, String cookie, ApiCallback _callback) throws ApiException
      Build call for updateRegistrationFlow
      Parameters:
      flow - The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). (required)
      updateRegistrationFlowBody - (required)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 successfulNativeRegistration -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 registrationFlow -
      410 errorGeneric -
      422 errorBrowserLocationChangeRequired -
      0 errorGeneric -
    • updateRegistrationFlow

      public SuccessfulNativeRegistration updateRegistrationFlow​(String flow, UpdateRegistrationFlowBody updateRegistrationFlowBody, String cookie) throws ApiException
      Update Registration Flow Use this endpoint to complete a registration flow by sending an identity's traits and password. This endpoint behaves differently for API and browser flows. API flows expect `application/json` to be sent in the body and respond with HTTP 200 and a application/json body with the created identity success - if the session hook is configured the `session` and `session_token` will also be included; HTTP 410 if the original flow expired with the appropriate error messages set and optionally a `use_flow_id` parameter in the body; HTTP 400 on form validation errors. Browser flows expect a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond with a HTTP 303 redirect to the post/after registration URL or the `return_to` value if it was set and if the registration succeeded; a HTTP 303 redirect to the registration UI URL with the flow ID containing the validation errors otherwise. Browser flows with an accept header of `application/json` will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. If this endpoint is called with `Accept: application/json` in the header, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Parameters:
      flow - The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). (required)
      updateRegistrationFlowBody - (required)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      Returns:
      SuccessfulNativeRegistration
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 successfulNativeRegistration -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 registrationFlow -
      410 errorGeneric -
      422 errorBrowserLocationChangeRequired -
      0 errorGeneric -
    • updateRegistrationFlowWithHttpInfo

      public ApiResponse<SuccessfulNativeRegistration> updateRegistrationFlowWithHttpInfo​(String flow, UpdateRegistrationFlowBody updateRegistrationFlowBody, String cookie) throws ApiException
      Update Registration Flow Use this endpoint to complete a registration flow by sending an identity's traits and password. This endpoint behaves differently for API and browser flows. API flows expect `application/json` to be sent in the body and respond with HTTP 200 and a application/json body with the created identity success - if the session hook is configured the `session` and `session_token` will also be included; HTTP 410 if the original flow expired with the appropriate error messages set and optionally a `use_flow_id` parameter in the body; HTTP 400 on form validation errors. Browser flows expect a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond with a HTTP 303 redirect to the post/after registration URL or the `return_to` value if it was set and if the registration succeeded; a HTTP 303 redirect to the registration UI URL with the flow ID containing the validation errors otherwise. Browser flows with an accept header of `application/json` will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. If this endpoint is called with `Accept: application/json` in the header, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Parameters:
      flow - The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). (required)
      updateRegistrationFlowBody - (required)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      Returns:
      ApiResponse<SuccessfulNativeRegistration>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 successfulNativeRegistration -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 registrationFlow -
      410 errorGeneric -
      422 errorBrowserLocationChangeRequired -
      0 errorGeneric -
    • updateRegistrationFlowAsync

      public okhttp3.Call updateRegistrationFlowAsync​(String flow, UpdateRegistrationFlowBody updateRegistrationFlowBody, String cookie, ApiCallback<SuccessfulNativeRegistration> _callback) throws ApiException
      Update Registration Flow (asynchronously) Use this endpoint to complete a registration flow by sending an identity's traits and password. This endpoint behaves differently for API and browser flows. API flows expect `application/json` to be sent in the body and respond with HTTP 200 and a application/json body with the created identity success - if the session hook is configured the `session` and `session_token` will also be included; HTTP 410 if the original flow expired with the appropriate error messages set and optionally a `use_flow_id` parameter in the body; HTTP 400 on form validation errors. Browser flows expect a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond with a HTTP 303 redirect to the post/after registration URL or the `return_to` value if it was set and if the registration succeeded; a HTTP 303 redirect to the registration UI URL with the flow ID containing the validation errors otherwise. Browser flows with an accept header of `application/json` will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. If this endpoint is called with `Accept: application/json` in the header, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
      Parameters:
      flow - The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). (required)
      updateRegistrationFlowBody - (required)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 successfulNativeRegistration -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 registrationFlow -
      410 errorGeneric -
      422 errorBrowserLocationChangeRequired -
      0 errorGeneric -
    • updateSettingsFlowCall

      public okhttp3.Call updateSettingsFlowCall​(String flow, UpdateSettingsFlowBody updateSettingsFlowBody, String xSessionToken, String cookie, ApiCallback _callback) throws ApiException
      Build call for updateSettingsFlow
      Parameters:
      flow - The Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). (required)
      updateSettingsFlowBody - (required)
      xSessionToken - The Session Token of the Identity performing the settings flow. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 settingsFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 settingsFlow -
      401 errorGeneric -
      403 errorGeneric -
      410 errorGeneric -
      422 errorBrowserLocationChangeRequired -
      0 errorGeneric -
    • updateSettingsFlow

      public SettingsFlow updateSettingsFlow​(String flow, UpdateSettingsFlowBody updateSettingsFlowBody, String xSessionToken, String cookie) throws ApiException
      Complete Settings Flow Use this endpoint to complete a settings flow by sending an identity's updated password. This endpoint behaves differently for API and browser flows. API-initiated flows expect `application/json` to be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 303 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 when `selfservice.flows.settings.privileged_session_max_age` was reached or the session's AAL is too low. Implies that the user needs to re-authenticate. Browser flows without HTTP Header `Accept` or with `Accept: text/_*` respond with a HTTP 303 redirect to the post/after settings URL or the `return_to` value if it was set and if the flow succeeded; a HTTP 303 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise. a HTTP 303 redirect to the login endpoint when `selfservice.flows.settings.privileged_session_max_age` was reached or the session's AAL is too low. Browser flows with HTTP Header `Accept: application/json` respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 401 when the endpoint is called without a valid session cookie. HTTP 403 when the page is accessed without a session cookie or the session's AAL is too low. HTTP 400 on form validation errors. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor (happens automatically for server-side browser flows) or change the configuration. If this endpoint is called with a `Accept: application/json` HTTP header, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `session_refresh_required`: The identity requested to change something that needs a privileged session. Redirect the identity to the login init endpoint with query parameters `?refresh=true&return_to=<the-current-browser-url>`, or initiate a refresh login flow otherwise. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `session_inactive`: No Ory Session was found - sign in a user first. `security_identity_mismatch`: The flow was interrupted with `session_refresh_required` but apparently some other identity logged in instead. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows. More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
      Parameters:
      flow - The Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). (required)
      updateSettingsFlowBody - (required)
      xSessionToken - The Session Token of the Identity performing the settings flow. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      Returns:
      SettingsFlow
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 settingsFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 settingsFlow -
      401 errorGeneric -
      403 errorGeneric -
      410 errorGeneric -
      422 errorBrowserLocationChangeRequired -
      0 errorGeneric -
    • updateSettingsFlowWithHttpInfo

      public ApiResponse<SettingsFlow> updateSettingsFlowWithHttpInfo​(String flow, UpdateSettingsFlowBody updateSettingsFlowBody, String xSessionToken, String cookie) throws ApiException
      Complete Settings Flow Use this endpoint to complete a settings flow by sending an identity's updated password. This endpoint behaves differently for API and browser flows. API-initiated flows expect `application/json` to be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 303 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 when `selfservice.flows.settings.privileged_session_max_age` was reached or the session's AAL is too low. Implies that the user needs to re-authenticate. Browser flows without HTTP Header `Accept` or with `Accept: text/_*` respond with a HTTP 303 redirect to the post/after settings URL or the `return_to` value if it was set and if the flow succeeded; a HTTP 303 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise. a HTTP 303 redirect to the login endpoint when `selfservice.flows.settings.privileged_session_max_age` was reached or the session's AAL is too low. Browser flows with HTTP Header `Accept: application/json` respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 401 when the endpoint is called without a valid session cookie. HTTP 403 when the page is accessed without a session cookie or the session's AAL is too low. HTTP 400 on form validation errors. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor (happens automatically for server-side browser flows) or change the configuration. If this endpoint is called with a `Accept: application/json` HTTP header, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `session_refresh_required`: The identity requested to change something that needs a privileged session. Redirect the identity to the login init endpoint with query parameters `?refresh=true&return_to=<the-current-browser-url>`, or initiate a refresh login flow otherwise. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `session_inactive`: No Ory Session was found - sign in a user first. `security_identity_mismatch`: The flow was interrupted with `session_refresh_required` but apparently some other identity logged in instead. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows. More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
      Parameters:
      flow - The Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). (required)
      updateSettingsFlowBody - (required)
      xSessionToken - The Session Token of the Identity performing the settings flow. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      Returns:
      ApiResponse<SettingsFlow>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 settingsFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 settingsFlow -
      401 errorGeneric -
      403 errorGeneric -
      410 errorGeneric -
      422 errorBrowserLocationChangeRequired -
      0 errorGeneric -
    • updateSettingsFlowAsync

      public okhttp3.Call updateSettingsFlowAsync​(String flow, UpdateSettingsFlowBody updateSettingsFlowBody, String xSessionToken, String cookie, ApiCallback<SettingsFlow> _callback) throws ApiException
      Complete Settings Flow (asynchronously) Use this endpoint to complete a settings flow by sending an identity's updated password. This endpoint behaves differently for API and browser flows. API-initiated flows expect `application/json` to be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 303 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 when `selfservice.flows.settings.privileged_session_max_age` was reached or the session's AAL is too low. Implies that the user needs to re-authenticate. Browser flows without HTTP Header `Accept` or with `Accept: text/_*` respond with a HTTP 303 redirect to the post/after settings URL or the `return_to` value if it was set and if the flow succeeded; a HTTP 303 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise. a HTTP 303 redirect to the login endpoint when `selfservice.flows.settings.privileged_session_max_age` was reached or the session's AAL is too low. Browser flows with HTTP Header `Accept: application/json` respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 401 when the endpoint is called without a valid session cookie. HTTP 403 when the page is accessed without a session cookie or the session's AAL is too low. HTTP 400 on form validation errors. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor (happens automatically for server-side browser flows) or change the configuration. If this endpoint is called with a `Accept: application/json` HTTP header, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `session_refresh_required`: The identity requested to change something that needs a privileged session. Redirect the identity to the login init endpoint with query parameters `?refresh=true&return_to=<the-current-browser-url>`, or initiate a refresh login flow otherwise. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `session_inactive`: No Ory Session was found - sign in a user first. `security_identity_mismatch`: The flow was interrupted with `session_refresh_required` but apparently some other identity logged in instead. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows. More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
      Parameters:
      flow - The Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). (required)
      updateSettingsFlowBody - (required)
      xSessionToken - The Session Token of the Identity performing the settings flow. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 settingsFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 settingsFlow -
      401 errorGeneric -
      403 errorGeneric -
      410 errorGeneric -
      422 errorBrowserLocationChangeRequired -
      0 errorGeneric -
    • updateVerificationFlowCall

      public okhttp3.Call updateVerificationFlowCall​(String flow, UpdateVerificationFlowBody updateVerificationFlowBody, String token, String cookie, ApiCallback _callback) throws ApiException
      Build call for updateVerificationFlow
      Parameters:
      flow - The Verification Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). (required)
      updateVerificationFlowBody - (required)
      token - Verification Token The verification token which completes the verification request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 verificationFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 verificationFlow -
      410 errorGeneric -
      0 errorGeneric -
    • updateVerificationFlow

      public VerificationFlow updateVerificationFlow​(String flow, UpdateVerificationFlowBody updateVerificationFlowBody, String token, String cookie) throws ApiException
      Complete Verification Flow Use this endpoint to complete a verification flow. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 303 See Other redirect with a fresh verification flow if the flow was otherwise invalid (e.g. expired). For Browser clients without HTTP Header `Accept` or with `Accept: text/_*` it returns a HTTP 303 See Other redirect to the Verification UI URL with the Verification Flow ID appended. `sent_email` is the success state after `choose_method` when using the `link` method and allows the user to request another verification email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a verification link\") does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Verification UI URL with a new Verification Flow ID which contains an error message that the verification link was invalid. More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
      Parameters:
      flow - The Verification Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). (required)
      updateVerificationFlowBody - (required)
      token - Verification Token The verification token which completes the verification request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      Returns:
      VerificationFlow
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 verificationFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 verificationFlow -
      410 errorGeneric -
      0 errorGeneric -
    • updateVerificationFlowWithHttpInfo

      public ApiResponse<VerificationFlow> updateVerificationFlowWithHttpInfo​(String flow, UpdateVerificationFlowBody updateVerificationFlowBody, String token, String cookie) throws ApiException
      Complete Verification Flow Use this endpoint to complete a verification flow. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 303 See Other redirect with a fresh verification flow if the flow was otherwise invalid (e.g. expired). For Browser clients without HTTP Header `Accept` or with `Accept: text/_*` it returns a HTTP 303 See Other redirect to the Verification UI URL with the Verification Flow ID appended. `sent_email` is the success state after `choose_method` when using the `link` method and allows the user to request another verification email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a verification link\") does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Verification UI URL with a new Verification Flow ID which contains an error message that the verification link was invalid. More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
      Parameters:
      flow - The Verification Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). (required)
      updateVerificationFlowBody - (required)
      token - Verification Token The verification token which completes the verification request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      Returns:
      ApiResponse<VerificationFlow>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Status Code Description Response Headers
      200 verificationFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 verificationFlow -
      410 errorGeneric -
      0 errorGeneric -
    • updateVerificationFlowAsync

      public okhttp3.Call updateVerificationFlowAsync​(String flow, UpdateVerificationFlowBody updateVerificationFlowBody, String token, String cookie, ApiCallback<VerificationFlow> _callback) throws ApiException
      Complete Verification Flow (asynchronously) Use this endpoint to complete a verification flow. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 303 See Other redirect with a fresh verification flow if the flow was otherwise invalid (e.g. expired). For Browser clients without HTTP Header `Accept` or with `Accept: text/_*` it returns a HTTP 303 See Other redirect to the Verification UI URL with the Verification Flow ID appended. `sent_email` is the success state after `choose_method` when using the `link` method and allows the user to request another verification email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a verification link\") does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Verification UI URL with a new Verification Flow ID which contains an error message that the verification link was invalid. More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
      Parameters:
      flow - The Verification Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). (required)
      updateVerificationFlowBody - (required)
      token - Verification Token The verification token which completes the verification request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional)
      cookie - HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 verificationFlow -
      303 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
      400 verificationFlow -
      410 errorGeneric -
      0 errorGeneric -