> 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/react-native/functions/facematch-and-liveness.md).

# Facematch & Liveness

## Facematch

### The method use for Facematch

```
AccurascanKyc.startFaceMatch(passArgs, function (error, success));
```

### *Parameter*:

***passArgs***: \[accuraConfs, config]

* **accuraConfs**: JSON Object
  * face\_uri: URI
* **config**: JSON Object
  * backGroundColor: Hex code&#x20;
  * closeIconColor: Hex code
  * feedbackBackGroundColor: Hex code
  * feedbackTextColor: Hex code
  * setFeedbackTextSize: Integer
  * setFeedBackframeMessage: String
  * setFeedBackAwayMessage: String
  * setFeedBackOpenEyesMessage: String
  * setFeedBackCloserMessage: String
  * setFeedBackCenterMessage: String
  * setFeedbackMultipleFaceMessage: String
  * setFeedBackFaceSteadymessage: String
  * setFeedBackLowLightMessage: String
  * setFeedBackBlurFaceMessage: String
  * setFeedBackGlareFaceMessage: String
  * setBlurPercentage: Integer
  * setGlarePercentage\_0: Integer
  * setGlarePercentage\_1: Integer
  * feedbackDialogMessage: String
  * feedBackProcessingMessage: String
  * isShowLogo: Integer(0 or 1)

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

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

#### Example Function:

```
onPressFaceMatch = () => {
 var accuraConfs = {
   face_uri: this.facematchURI,
 };
 var fconfig = {
   backGroundColor: '#FFC4C4C5',
   closeIconColor: '#FF000000',
   feedbackBackGroundColor: '#FFC4C4C5',
   feedbackTextColor: '#FF000000',
   setFeedbackTextSize: 18,
   setFeedBackframeMessage: 'Frame Your Face',
   setFeedBackAwayMessage: 'Move Phone Away',
   setFeedBackOpenEyesMessage: 'Keep Your Eyes Open',
   setFeedBackCloserMessage: 'Move Phone Closer',
   setFeedBackCenterMessage: 'Move Phone Center',
   setFeedbackMultipleFaceMessage: 'Multiple Face Detected',
   setFeedBackFaceSteadymessage: 'Keep Your Head Straight',
   setFeedBackLowLightMessage: 'Low light detected',
   setFeedBackBlurFaceMessage: 'Blur Detected Over Face',
   setFeedBackGlareFaceMessage: 'Glare Detected',
   setBlurPercentage: 80,
   setGlarePercentage_0: -1,
   setGlarePercentage_1: -1,
   feedbackDialogMessage: 'Loading...',
   feedBackProcessingMessage: 'Processing...',
   isShowLogo: 1,
 };
 let passArgs = [accuraConfs, fconfig];

 AccurascanKyc.startFaceMatch(passArgs, (error, response) => {
   if (error != null) {
     console.log(error);
   } else {
     console.log('Success!', response);
   }
 });
};
```

## Liveness

### The method use for Liveness

```
AccurascanKyc.startLiveness(passArgs, function (error, success));
```

### Parameters:

***passArgs***: \[accuraConfs, config]

* **accuraConfs**: JSON Object
  * face\_uri: 'uri of face'
* **config**: JSON Object
  * backGroundColor: Hex code
  * closeIconColor: Hex code
  * feedbackBackGroundColor: Hex code
  * feedbackTextColor: Hex code
  * setFeedbackTextSize: Integer
  * setFeedBackframeMessage: String
  * setFeedBackAwayMessage: String
  * setFeedBackOpenEyesMessage: String
  * setFeedBackCloserMessage: String
  * setFeedBackCenterMessage: String
  * setFeedbackMultipleFaceMessage: String
  * setFeedBackFaceSteadymessage: String
  * setFeedBackBlurFaceMessage: String
  * setFeedBackGlareFaceMessage: String
  * setBlurPercentage: Integer
  * setGlarePercentage\_0: Integer
  * setGlarePercentage\_1: Integer
  * setLivenessURL: 'Your URL',&#x20;
  * setFeedBackLowLightMessage: String
  * feedbackLowLightTolerence: Integer
  * feedbackDialogMessage: String
  * feedBackProcessingMessage: String
  * isShowLogo: Integer(0 or 1),

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

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

#### Example Function:

```
onPressStartLiveness = () => {
 var accuraConfs = {
   face_uri: this.facematchURI,
 };

 var lconfig = {
   backGroundColor: '#FFC4C4C5',
   closeIconColor: '#FF000000',
   feedbackBackGroundColor: '#FFC4C4C5',
   feedbackTextColor: '#FF000000',
   setFeedbackTextSize: 18,
   setFeedBackframeMessage: 'Frame Your Face',
   setFeedBackAwayMessage: 'Move Phone Away',
   setFeedBackOpenEyesMessage: 'Keep Your Eyes Open',
   setFeedBackCloserMessage: 'Move Phone Closer',
   setFeedBackCenterMessage: 'Move Phone Center',
   setFeedbackMultipleFaceMessage: 'Multiple Face Detected',
   setFeedBackFaceSteadymessage: 'Keep Your Head Straight',
   setFeedBackBlurFaceMessage: 'Blur Detected Over Face',
   setFeedBackGlareFaceMessage: 'Glare Detected',
   setBlurPercentage: 80,
   setGlarePercentage_0: -1,
   setGlarePercentage_1: -1,
   setLivenessURL: 'Your URL',
   setFeedBackLowLightMessage: 'Low light detected',
   feedbackLowLightTolerence: 39,
   feedbackDialogMessage: 'Loading...',
   feedBackProcessingMessage: 'Processing...',
   isShowLogo: 1,
 };

 let passArgs = [accuraConfs, lconfig];

 AccurascanKyc.startLiveness(passArgs, (error, response) => {
   if (error != null) {
     console.log(error);
   } else {
     console.log('Success!', response);
   }
 });
};
```


---

# 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/react-native/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.
