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

# Options

> See how to further customize the SDK

<ResponseField name="apiURL" type="string" required>
  This is the address of the Legitimuz API.

  Example: `https://api.legitimuz.com`
</ResponseField>

<ResponseField name="appURL" type="string" required>
  This is the address of Legitimuz Verify.

  Example: `https://liveness.legitimuz.com`
</ResponseField>

<ResponseField name="token" type="string" required>
  The token is your integration token. You can generate an integration token on the
  [integrations](https://dashboard.legitimuz.com/dashboard/integrations) page under the `installation` tab in the Legitimuz Dashboard.
</ResponseField>

<ResponseField name="lang" type="string: pt | en | es" default="pt">
  The `lang` option sets the language that will be used in the [Face Index](./introduction) flow.
</ResponseField>

<ResponseField name="onSuccess" type="function: (eventName: 'faceindex'): void">
  The success callback is triggered when `success` occurs at any stage of the [Face Index](./introduction) flow.
  A [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) with the stage where success occurred is passed as a parameter.

  Examples:

  <CodeGroup>
    ```html theme={null}
    <div id="legitimuz-root"></div>
    <script src="https://cdn.legitimuz.com/js/sdk/faceindex.js"></script>
    <script type="text/javascript">
      const sdkInstance = LegitimuzFaceIndex({
        /* options */
        onSuccess(eventName) {
          console.log(eventName); // faceindex
        },
      });

      sdkInstance.mount();
    </script>
    ```

    ```jsx theme={null}
    import { useRef } from 'react';

    function Component() {
      const sdkInstance = useRef(null);

      const handleOnLoadSDK = () => {
        sdkInstance.current = LegitimuzFaceIndex({
          /* options */
          onSuccess(eventName) {
            console.log(eventName); // faceindex
          },
        });

        sdkInstance.current.mount();
      }

      return (
        <>
          <input id="legitimuz-hydrate-cpf" type="tel" />
          <script
            src="https://cdn.legitimuz.com/js/sdk/faceindex.js"
            onLoad={handleOnLoadSDK}
          ></script>
        </>
      );
    }
    ```
  </CodeGroup>
</ResponseField>

<ResponseField name="onError" type="function: (eventName: 'faceindex'): void">
  The error callback is triggered when an `error` occurs at any stage of the [Face Index](./introduction) flow.
  A [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) with the stage where the error occurred is passed as a parameter.

  Examples:

  <CodeGroup>
    ```html theme={null}
    <div id="legitimuz-root"></div>
    <script src="https://cdn.legitimuz.com/js/sdk/faceindex.js"></script>
    <script type="text/javascript">
      const sdkInstance = LegitimuzFaceIndex({
        /* options */
        onError(eventName) {
          console.log(eventName); // faceindex
        },
      });

      sdkInstance.mount();
    </script>
    ```

    ```jsx theme={null}
    import { useRef } from 'react';

    function Component() {
      const sdkInstance = useRef(null);

      const handleOnLoadSDK = () => {
        sdkInstance.current = LegitimuzFaceIndex({
          /* options */
          onError(eventName) {
            console.log(eventName); // faceindex
          },
        });

        sdkInstance.current.mount();
      }

      return (
        <>
          <input id="legitimuz-hydrate-cpf" type="tel" />
          <script
            src="https://cdn.legitimuz.com/js/sdk/faceindex.js"
            onLoad={handleOnLoadSDK}
          ></script>
        </>
      );
    }
    ```
  </CodeGroup>
</ResponseField>
