> For the complete documentation index, see [llms.txt](https://docs.uqudo.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uqudo.com/docs/kyc/uqudo-sdk/integration/capacitor/face-session-flow.md).

# Face Session Flow

Add the following code at the start-up of your application to initialise the SDK:

```javascript
import * as UqudoSDK from 'uqudosdk-capacitor';

...
//On App startup
new UqudoSDK.UqudoPlugin().init();
...
```

Below you can find an example on how to initiate the face session process:

```javascript
var token = "<please put your token here>";
var faceSession = new UqudoSDK.FaceSessionConfigurationBuilder()
	.setToken(token)
	.setSessionId("<your session id>")
	.build();

try {
   const plugin = new UqudoSDK.UqudoPlugin();
   const result = await plugin.faceSession(faceSession);
   console.log(result.value);
} catch (error) {
}
```

In order to evaluate all the possible options please refer to section [Face Session Flow](/docs/kyc/uqudo-sdk/integration/android/face-session-flow.md). The JS interface is the porting of the JAVA one. In addition, you can check UqudoCordovaPlugin.js inside the plugin folder or directly from your IDE.

If **successful**, the response is a JSON Web Signature (JWS). Please refer to section "[SDK result](/docs/kyc/uqudo-sdk/sdk-result.md)" for further details.

In case of a **failure**, the callback returns the following object:

<table><thead><tr><th width="119">Property</th><th width="112">Type</th><th width="98">Optional</th><th width="98">Default</th><th>Description</th></tr></thead><tbody><tr><td>code</td><td>String</td><td>No</td><td>None</td><td>See <a href="/pages/N3LvvSBJs3ZtSPx6Czsf#handling-the-result">Handling the Result</a></td></tr><tr><td>message</td><td>String</td><td>Yes</td><td>null</td><td>Description of the error if any</td></tr><tr><td>task</td><td>String</td><td>Yes</td><td>FACE</td><td>The value will be always FACE as the only step involved in account recovery is facial recognition</td></tr></tbody></table>


---

# 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.uqudo.com/docs/kyc/uqudo-sdk/integration/capacitor/face-session-flow.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.
