clients/kratos/ruby/lib/ory-kratos-client/api/v0alpha1_api.rb
# Complete Verification Flow
# Use this endpoint to complete a verification flow. This endpoint behaves differently for API and browser flows and has several states:  &#x60;choose_method&#x60; expects &#x60;flow&#x60; (in the URL query) and &#x60;email&#x60; (in the body) to be sent and works with API- and Browser-initiated flows. For API clients and Browser clients with HTTP Header &#x60;Accept: application/json&#x60; 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 &#x60;Accept&#x60; or with &#x60;Accept: text/*&#x60; it returns a HTTP 302 Found redirect to the Verification UI URL with the Verification Flow ID appended. &#x60;sent_email&#x60; is the success state after &#x60;choose_method&#x60; when using the &#x60;link&#x60; 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 &#x60;choose_method&#x60; state. &#x60;passed_challenge&#x60; expects a &#x60;token&#x60; to be sent in the URL query and given the nature of the flow (\&quot;sending a verification link\&quot;) 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](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
# @param flow [String] The Verification Flow ID  The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/verification?flow&#x3D;abcde&#x60;).
# @param [Hash] opts the optional parameters
# @option opts [String] :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.
# @option opts [SubmitSelfServiceVerificationFlowBody] :submit_self_service_verification_flow_body 
# @return [Array<(SelfServiceVerificationFlow, Integer, Hash)>] SelfServiceVerificationFlow data, response status code and response headers
Complete Verification Flow
Use this endpoint to complete a verification flow.
Complete Verification Flow Use this endpoint to complete a verification flow .
def submit_self_service_verification_flow_with_http_info(flow, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: V0alpha1Api.submit_self_service_verification_flow ...'
      end
      if @api_client.config.client_side_validation && flow.nil?
        fail ArgumentError, "Missing the required parameter 'flow' when calling V0alpha1Api.submit_self_service_verification_flow"
      end
      local_var_path = '/self-service/verification'
      query_params = opts[:query_params] || {}
      query_params[:'flow'] = flow
      query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
      form_params = opts[:form_params] || {}
      post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'submit_self_service_verification_flow_body'])
      return_type = opts[:debug_return_type] || 'SelfServiceVerificationFlow'
      auth_names = opts[:debug_auth_names] || []
      new_options = opts.merge(
        :operation => :"V0alpha1Api.submit_self_service_verification_flow",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )
      data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V0alpha1Api#submit_self_service_verification_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def submit_self_service_verification_flow_with_http_info ( flow , opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: V0alpha1Api.submit_self_service_verification_flow ...' end if @api_client . config . client_side_validation && flow . nil? fail ArgumentError , "Missing the required parameter 'flow' when calling V0alpha1Api.submit_self_service_verification_flow" end local_var_path = '/self-service/verification' query_params = opts [ :query_params ] || { } query_params [ :' flow ' ] = flow query_params [ :' token ' ] = opts [ :' token ' ] if ! opts [ :' token ' ] . nil? header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) header_params [ 'Content-Type' ] = @api_client . select_header_content_type ( [ 'application/json' , 'application/x-www-form-urlencoded' ] ) form_params = opts [ :form_params ] || { } post_body = opts [ :debug_body ] || @api_client . object_to_http_body ( opts [ :' submit_self_service_verification_flow_body ' ] ) return_type = opts [ :debug_return_type ] || 'SelfServiceVerificationFlow' auth_names = opts [ :debug_auth_names ] || [ ] new_options = opts . merge ( :operation => :" V0alpha1Api.submit_self_service_verification_flow " , :header_params => header_params , :query_params => query_params , :form_params => form_params , :body => post_body , :auth_names => auth_names , :return_type => return_type ) data , status_code , headers = @api_client . call_api ( :POST , local_var_path , new_options ) if @api_client . config . debugging @api_client . config . logger . debug "API called: V0alpha1Api#submit_self_service_verification_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Complete Verification Flow
Use this endpoint to complete a verification flow.
Complete Verification Flow Use this endpoint to complete a verification flow .
# verify the required parameter 'flow' is set # resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # HTTP header 'Content-Type' # form parameters # http body (model) # return_type # auth_names
SelfServiceVerificationFlow data, response status code and response headers
SelfServiceVerificationFlow data response status code and response headers
Array<(SelfServiceVerificationFlow, Integer, Hash)>
flow
The Verification Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application .
The Verification Flow ID The value for this parameter comes from ` flow ` URL Query parameter sent to your application .
opts
None
<not_specific>
opts the optional parameters
opts the optional parameters