> ## Documentation Index
> Fetch the complete documentation index at: https://docs.verisoul.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Simulate Face Match

> Bypass verification when testing

# Simulation Mode

When developing and testing your Face Match integration, you can use simulation mode to test different scenarios without performing actual liveness checks. This makes development and testing much faster and more efficient.

<Info>
  Simulation mode is only available in the sandbox environment
</Info>

## How to Use Simulation Mode

To use simulation mode, simply add the `simulate` query parameter when getting a Face Match session\_id.

When you navigate to the user with that session, the page will wait for 3 seconds before redirecting with the simulated response, mimicking the real-world flow.

The session will redirect with the same error or success case that you specified in the `simulate` parameter.

### Available Simulation Cases

The following simulation cases are available for testing:

* `invalid_session_id` - Simulates an invalid session ID error
* `session_id_not_found` - Simulates a case where the session ID cannot be found
* `failed_to_get_camera_permission` - Simulates a camera permission failure
* `failed_to_complete_face_scan` - Simulates a face scan failure
* `failed_to_collect_device_data` - Simulates a device data collection failure
* `liveness_check_failed` - Simulates a failed liveness check
* `success` - Simulates a successful verification

### Example Testing Flow

1. Add the `simulate` parameter to [GET /liveness/session](/api-reference/face-match/session#parameter-simulate) with the case you want to test

```
GET /liveness/session?simulate=liveness_check_failed

{
    "request_id": "c6716efe-3624-4813-9a59-175d8fee484c",
    "session_id": "{some-simulated-session-id}"
}
```

2. Navigate to the Face Match URL like normal and wait 3 seconds

```
https://app.sandbox.verisoul.ai?session_id={some-simulated-session-id}
```

3. The page will redirect you with the correct error or success message, bypassing any liveness or document checks

```
https://verisoul.ai?session_id={some-simulated-session-id}&success=false&error_message=liveness_check_failed
```

## API Responses

When calling the API with sessions that have been simulated you can expect:

* For `success` case: You will receive a response with stubbed data
* For all other cases: You will receive a 400 response

<Info>
  The error responses in simulation mode may not exactly match the production error responses. They are intended for testing the basic flow of your integration.
</Info>

This allows you to test your integration's error handling and success flows without needing to perform actual verifications.
