Skip to content

get_face_liveness_session_results

get_face_liveness_session_results(
    session_id: LivenessSessionId,
    *,
    config_overrides: Optional[RekognitionClientConfig] = None,
) -> GetFaceLivenessSessionResultsResponse

Retrieves the results of a specific Face Liveness session. It requires the sessionId as input, which was created using CreateFaceLivenessSession. Returns the corresponding Face Liveness confidence score, a reference image that includes a face bounding box, and audit images that also contain face bounding boxes. The Face Liveness confidence score ranges from 0 to 100.

The number of audit images returned by GetFaceLivenessSessionResults is defined by the AuditImagesLimit paramater when calling CreateFaceLivenessSession. Reference images are always returned when possible.

For a session that has completed, the response can also include a Feedback list describing conditions that were detected in the selfie-video, such as low lighting or an obstructed face, and Metadata about the client that streamed the session.

Parameters:

  • session_id (LivenessSessionId) –

    A unique 128-bit UUID. This is used to uniquely identify the session and also acts as an idempotency token for all operations associated with the session.

Raises:

Source code in docs_src/capo_rekognition/_services/rekognition.py
def get_face_liveness_session_results(
    self,
    session_id: "capo_rekognition.types.liveness_session_id.LivenessSessionId",
    *,
    config_overrides: Optional[RekognitionClientConfig] = None,
) -> "capo_rekognition.types.get_face_liveness_session_results_response.GetFaceLivenessSessionResultsResponse":
    """<p>Retrieves the results of a specific Face Liveness session. It requires the <code>sessionId</code> as input, which was created using <code>CreateFaceLivenessSession</code>. Returns the corresponding Face Liveness confidence score, a reference image that includes a face bounding box, and audit images that also contain face bounding boxes. The Face Liveness confidence score ranges from 0 to 100. </p> <p>The number of audit images returned by <code>GetFaceLivenessSessionResults</code> is defined by the <code>AuditImagesLimit</code> paramater when calling <code>CreateFaceLivenessSession</code>. Reference images are always returned when possible.</p> <p>For a session that has completed, the response can also include a <code>Feedback</code> list describing conditions that were detected in the selfie-video, such as low lighting or an obstructed face, and <code>Metadata</code> about the client that streamed the session.</p>

    Args:
        session_id: <p>A unique 128-bit UUID. This is used to uniquely identify the session and also acts as an idempotency token for all operations associated with the session.</p>

    Raises:
        capo_rekognition.errors.access_denied_exception.AccessDeniedException: <p>You are not authorized to perform the action.</p>
        capo_rekognition.errors.internal_server_error.InternalServerError: <p>Amazon Rekognition experienced a service issue. Try your call again.</p>
        capo_rekognition.errors.invalid_parameter_exception.InvalidParameterException: <p>Input parameter violated a constraint. Validate your parameter before calling the API operation again.</p>
        capo_rekognition.errors.provisioned_throughput_exceeded_exception.ProvisionedThroughputExceededException: <p>The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition.</p>
        capo_rekognition.errors.session_not_found_exception.SessionNotFoundException: <p>Occurs when a given sessionId is not found.</p>
        capo_rekognition.errors.throttling_exception.ThrottlingException: <p>Amazon Rekognition is temporarily unable to process the request. Try your call again.</p>
        capo_rekognition.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_rekognition.types.get_face_liveness_session_results_request.GetFaceLivenessSessionResultsRequest]",
    ) -> OperationResponse[
        "capo_rekognition.types.get_face_liveness_session_results_response.GetFaceLivenessSessionResultsResponse"
    ]:
        import capo_rekognition._operations.rekognition_service.get_face_liveness_session_results

        output, http_response = (
            capo_rekognition._operations.rekognition_service.get_face_liveness_session_results.get_face_liveness_session_results(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_rekognition.types.get_face_liveness_session_results_response.GetFaceLivenessSessionResultsResponse",
    ) -> dict[str, Any]:
        import capo_rekognition.types.get_face_liveness_session_results_response

        return capo_rekognition.types.get_face_liveness_session_results_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "GetFaceLivenessSessionResults", redact_output=_redact_output
        ),
    )
    input_: capo_rekognition.types.get_face_liveness_session_results_request.GetFaceLivenessSessionResultsRequest = {
        "session_id": session_id
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output