pub async fn submit_self_service_verification_flow(
    configuration: &Configuration,
    flow: &str,
    token: Option<&str>,
    submit_self_service_verification_flow_body: Option<SubmitSelfServiceVerificationFlowBody>
) -> Result<SelfServiceVerificationFlow, Error<SubmitSelfServiceVerificationFlowError>>
Expand description

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 302 Found 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 302 Found 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 302 Found 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.