> For the complete documentation index, see [llms.txt](https://doc.ozforensics.com/oz-knowledge/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.ozforensics.com/oz-knowledge/guides/developer-guide/sdk/oz-liveness-websdk/web-plugin/launching-the-plugin/description-of-the-on_complete-callback.md).

# Description of the on\_complete Callback

This callback is called after the check is completed. It retrieves the analysis result (unavailable for the `capture` mode). The result content depends on the Web Adapter `result_mode` [configuration parameter](/oz-knowledge/guides/administrator-guide/configuration/web-adapter/configuration-file-settings.md).

{% hint style="info" %}
Keep in mind that it is more secure to get your back end responsible for the decision logic. You can find more details including code samples [here](/oz-knowledge/guides/developer-guide/sdk/oz-liveness-websdk/web-plugin/security-recommendations.md).
{% endhint %}

### Safe

When `result_mode` is `safe`, the `on_complete` callback contains the state of the analysis only:

```json
{
  "state": "finished"
}
```

{% hint style="danger" %}
Please note: The options listed below are for testing purposes only. If you require more information than what is available in the Safe mode, please follow [Security Recommendations](/oz-knowledge/guides/developer-guide/sdk/oz-liveness-websdk/web-plugin/security-recommendations.md).
{% endhint %}

### Status

For the `status` value, the callback contains the state of the analysis, and for each of the analysis types, the name of the type, state, and resolution.

```json
{
 "state": "finished",
 "analyses": {
   "quality": {
     "state": "finished",
     "resolution": "SUCCESS"
   }
 }
}
```

### Folder

The `folder` value is almost similar to the `status` value, with the only difference: the `folder_id` is added.

```json
{
 "state": "finished",
 "folder_id": "your_folder_id",
 "analyses": {
   "quality": {
     "state": "finished",
     "resolution": "SUCCESS"
   }
 }
}
```

### Full

In this case, you receive the detailed response possibly containing sensitive data. This mode is deprecated; for security reasons, we recommend using the `safe` mode.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.ozforensics.com/oz-knowledge/guides/developer-guide/sdk/oz-liveness-websdk/web-plugin/launching-the-plugin/description-of-the-on_complete-callback.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
