> For the complete documentation index, see [llms.txt](https://docs.accurascan.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.accurascan.com/language/xamarin/functions/facematch-and-liveness.md).

# Facematch & Liveness

## Facematch

### The method use to start Facematch

```
accuraService.StartFaceMatch(accuraConfs, config, appOriantation, new AccuraScanResultCallBack());
```

### *Parameter:*

* *accuraConfs*: JSON Object
  * enableLogs: Boolean
  * with\_face: Boolean
  * face\_uri: URI
* *config*: JSON Object
  * feedbackTextSize: integer
  * feedBackframeMessage: String
  * feedBackAwayMessage: String
  * feedBackOpenEyesMessage: String
  * feedBackCloserMessage: String
  * feedBackCenterMessage: String
  * feedBackMultipleFaceMessage: String
  * feedBackHeadStraightMessage: String
  * feedBackBlurFaceMessage: String
  * feedBackGlareFaceMessage: String
  * setBlurPercentage: integer
  * setGlarePercentage\_0: integer
  * setGlarePercentage\_1: integer
* *Orientation*: String (Default portrait)

### ***Response:***&#x20;

***Success***: JSON Response\
\&#xNAN;***Error***: String

#### Example Function:

```
public partial class MainPage : ContentPage
{
    public MainPage()
    {
        JObject accuraConfigObj = JObject.Parse(@"{
            'enableLogs' : false,
            'with_face' : true,
            'face_uri' : 'your face uri'
        }");
        JObject configObj = JObject.Parse(@"{
            'feedbackTextSize' : 18,
            'feedBackframeMessage' : 'Frame Your Face',
            'feedBackLowLightMessage' : 'Low light detected',
            'feedBackStartMessage' : 'Put your face inside the oval',
            'feedBackAwayMessage' : 'Move Phone Away',
            'feedBackOpenEyesMessage' : 'Keep Your Eyes Open',
            'feedBackCloserMessage' : 'Move Phone Closer',
            'feedBackCenterMessage' : 'Move Phone Center',
            'feedBackMultipleFaceMessage' : 'Multiple Face Detected',
            'feedBackHeadStraightMessage' : 'Keep Your Head Straight',
            'feedBackBlurFaceMessage' : 'Blur Detected Over Face',
            'feedBackGlareFaceMessage' : 'Glare Detected',
            'feedBackProcessingMessage' : 'Processing...',
            'setBlurPercentage' : 99,
            'setGlarePercentage_0' : -1,
            'setGlarePercentage_1' : -1,
            'isShowLogo' : true
        }");
        accuraService.StartFaceMatch(accuraConfigObj.ToString(), configObj.ToString(), appOriantation, new AccuraScanResultCallBack());
    }
}
public class AccuraScanResultCallBack : AccuraServiceCallBack {
    public void InvokeResult(string error, string result) {
        if (error != null) {
            // Error block.
        }
        else {
            // Result from the SDK
        }
    }
}
```

## Liveness

### The method use to start Liveness

```
accuraService.StartLiveness(accuraConfs, config, appOriantation, new AccuraScanResultCallBack());
```

### *Parameter:*

* *accuraConfs*: JSON Object
  * enableLogs: Boolean
  * with\_face: Boolean
  * face\_uri: URI
* *config*: JSON Object
  * feedbackTextSize: integer
  * feedBackframeMessage: String
  * feedBackAwayMessage: String
  * feedBackOpenEyesMessage: String
  * feedBackCloserMessage: String
  * feedBackCenterMessage: String
  * feedBackMultipleFaceMessage: String
  * feedBackHeadStraightMessage: String
  * feedBackBlurFaceMessage: String
  * feedBackGlareFaceMessage: String
  * setBlurPercentage: integer
  * setGlarePercentage\_0: integer
  * setGlarePercentage\_1: integer
  * isSaveImage: Boolean
  * liveness\_url: URL **(Require)**
  * contentType: String
  * feedBackLowLightMessage: String
  * feedbackLowLightTolerence: integer,
  * feedBackStartMessage: String
  * feedBackLookLeftMessage: String
  * feedBackLookRightMessage: String
  * feedBackOralInfoMessage: String
  * enableOralVerification: Boolean,
  * codeTextColor: String
* *Orientation*: String (Default portrait)

### ***Response:***&#x20;

***Success***: JSON Response\
\&#xNAN;***Error***: String

#### Example Function:

```
public partial class MainPage : ContentPage
{
    public MainPage()
    {
        JObject accuraConfigObj = JObject.Parse(@"{
            'enableLogs' : false,
            'with_face' : false,
            'face_uri' : 'your face uri'}");
        JObject configObj = JObject.Parse(@"{
            'feedbackTextSize' : 18,
            'feedBackframeMessage' : 'Frame Your Face',
            'feedBackAwayMessage' : 'Move Phone Away',
            'feedBackOpenEyesMessage' : 'Keep Your Eyes Open',
            'feedBackCloserMessage' : 'Move Phone Closer',
            'feedBackCenterMessage' : 'Move Phone Center',
            'feedBackMultipleFaceMessage' : 'Multiple Face Detected',
            'feedBackHeadStraightMessage' : 'Keep Your Head Straight',
            'feedBackBlurFaceMessage' : 'Blur Detected Over Face',
            'feedBackGlareFaceMessage' : 'Glare Detected',
            'setBlurPercentage' : 99,
            'setGlarePercentage_0' : -1,
            'setGlarePercentage_1' : -1,
            'isSaveImage' : true,
            'liveness_url' : 'your liveness url',
            'contentType' : 'form_data',
            'feedBackLowLightMessage' : 'Low light detected',
            'feedbackLowLightTolerence' : 39,
            'feedBackStartMessage' : 'Put your face inside the oval',
            'feedBackLookLeftMessage' : 'Look over your left shoulder',
            'feedBackLookRightMessage' : 'Look over your right shoulder',
            'feedBackOralInfoMessage' : 'Say each digits out loud',
            'feedBackProcessingMessage' : 'Processing...',
            'enableOralVerification' : false,
            'codeTextColor' : 'white',
            'isShowLogo' : true
        }");
        accuraService.StartLiveness(accuraConfigObj.ToString(), configObj.ToString(), appOriantation, new AccuraScanResultCallBack());
    }
}
public class AccuraScanResultCallBack : AccuraServiceCallBack {
    public void InvokeResult(string error, string result) {
        if (error != null) {
            // Error block.
        }
        else {
            // Result from the SDK.
        }
    }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.accurascan.com/language/xamarin/functions/facematch-and-liveness.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
