> ## 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.

# Navigate to ID Check

> How to direct users to the ID Check verification interface

Once you have fetched a valid session token, you can navigate the user to Verisoul's ID Check URL to complete the verification process.

## ID Check URL

The ID Check URL is:
`https://app.{env}.verisoul.ai/` where `{env}` is:

* `prod` for production
* `sandbox` for sandbox

The ID Check URL accepts the following query parameters:

<ResponseField name="session_id" type="string" required>
  The session token obtained from the Verisoul API
</ResponseField>

<ResponseField name="redirect_url" type="string">
  The URL encoded string to redirect to after the verification is complete (default: [https://verisoul.ai](https://verisoul.ai))
</ResponseField>

<ResponseField name="lng" type="string">
  Optional language parameter to customize the instructions (default: en)
  See [Localization](/verifications/id-check/integration/localization) for more details
</ResponseField>

## On Completion

Once the ID Check session is complete, the user will be sent to the `redirect_url` configured in the query parameters. By default, ID Check redirects to `https://verisoul.ai`.

The completed redirect URL will contain the following parameters:

<ResponseField name="session_id" type="string">
  The session ID used for the verification
</ResponseField>

<ResponseField name="success" type="boolean">
  Whether the verification was successful
</ResponseField>

<ResponseField name="error_message" type="string">
  Present only if success is `false`, contains the reason for failure
</ResponseField>

## Navigation Options

<Tabs>
  <Tab title="Web">
    <div className="mt-4">
      <p>For web applications, you can redirect the user to the FaceMatch URL:</p>

      ```javascript theme={null}
      function redirectToIDCheck(sessionId) {
        const redirectUrl = encodeURIComponent(window.location.origin + '/verification-complete');
        const idcheckUrl = `https://app.prod.verisoul.ai/?session_id=${sessionId}&redirect_url=${redirectUrl}`;
        
        window.location.href = idcheckUrl;
      }
      ```

      <Note>
        If your user is on desktop, Face Match will automatically recognize this and display a QR code so that the user can complete the verification on their mobile device.
      </Note>
    </div>
  </Tab>

  <Tab title="Mobile">
    <div className="mt-4">
      <p>For mobile applications, you can open Face Match in a webview:</p>

      ```javascript theme={null}
      import { WebView } from 'react-native-webview';

      function IDCheckVerification({ sessionId, onComplete }) {
        const idcheckUrl = `https://app.prod.verisoul.ai/?session_id=${sessionId}&redirect_url=yourapp://verification-complete`;
        
        return (
          <WebView
            source={{ uri: facematchUrl }}
            onNavigationStateChange={(navState) => {
              // Handle redirect back to your app
              if (navState.url.startsWith('yourapp://')) {
                // Extract parameters from URL
                const url = new URL(navState.url);
                const status = url.searchParams.get('status');
                const errorMessage = url.searchParams.get('error_message');
                
                onComplete({ status, errorMessage });
              }
            }}
          />
        );
      }
      ```
    </div>
  </Tab>
</Tabs>

## Error Handling

Error messages can include:

* **invalid\_session\_id**: The session token provided is expired or invalid
* **session\_id\_not\_found**: No session token was provided
* **failed\_to\_get\_camera\_permission**: The user did not agree to give the browser camera permissions
* **failed\_to\_complete\_face\_scan**: The user was not able to complete the face scan process
* **failed\_to\_process\_id\_scan**: This user was not able to complete the identity document capture process
* **failed\_to\_collect\_device\_data**: The user's device/network was not able to send device data
* **liveness\_check\_failed**: The user did not pass liveness verification
* **max\_duration\_exceeded**: The session exceeded the 10 minute time limit from when it was initialized

<Warning>
  It is recommended to parse the error\_message and prompt the user to restart the ID Check process. To let a user retry, you will need to fetch a new session token.
</Warning>

## Next Steps

After the user completes the ID Check verification, you can verify and enroll the user to implement uniqueness checks or authentication.
