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

# Identity Verification

export const ParamList = ({items = [], is_child = false}) => {
  return items.map(item => {
    const field_props = {
      id: Math.random().toString(),
      body: item.name,
      name: item.name,
      type: item.type,
      required: item.required
    };
    const enums = item.enums || [];
    const items = item.items || [];
    const has_items = items?.length > 0;
    const has_enums = enums?.length > 0;
    const should_default_open = item.defaultOpen || false;
    const render_child_item = () => {
      const child_props = {
        title: has_enums ? "Possible enum values" : "properties"
      };
      if (should_default_open) child_props.defaultOpen = true;
      const has_inline_enums = has_enums && enums.every(enum_item => typeof enum_item === 'string') && enums.map((enum_item, idx) => {
        const is_last = idx === enums.length - 1;
        const is_2nd_to_last = idx === enums.length - 2;
        return <>
            <code>{enum_item}</code>
            {is_last && ''}
            {is_2nd_to_last && ' or '}
            {!is_last && !is_2nd_to_last && ', '}
          </>;
      });
      const enum_list = has_enums && !has_inline_enums && <Accordion {...child_props}>
          {enums.map((enum_item, index) => <div key={`enum-${index}`}>
              <code>{enum_item.name}</code>
              <br />
              <p>{enum_item.description}</p>
            </div>)}
        </Accordion>;
      const item_list = has_items && <Expandable {...child_props}>
          <ParamList items={items || []} is_child />
        </Expandable>;
      return <>
          <p>
            {item.description}
            {has_inline_enums && [has_inline_enums.length > 1 ? ' One of ' : ' Must be ', ...has_inline_enums]}
          </p>

          {enum_list}
          {item_list}
        </>;
    };
    return is_child ? <ResponseField {...field_props}>{render_child_item()}</ResponseField> : <ParamField {...field_props}>{render_child_item()}</ParamField>;
  });
};

<Note>Mode: `identity_verification`</Note>

Opal Identity Verification is a pre-built flow for verifying user identity. It provides a secure, compliant way to collect and verify personal information like name, date of birth, address, and other identity details needed for KYC/AML requirements.

<img src="https://mintcdn.com/methodfinancial/eYCszB8Xv_iFcf77/images/identity-hero.svg?fit=max&auto=format&n=eYCszB8Xv_iFcf77&q=85&s=f6d99b97cd5ae3bc618b89ab0908fb9b" alt="identity-hero" width="1920" height="1080" data-path="images/identity-hero.svg" />

## What this mode does

Identity Verification collects, confirms, and verifies a user's identity details (name, DOB, address, phone, SSN if needed). Users must explicitly confirm their details before verification challenges begin. Identity Verification will automatically be invoked when needed, or can be used as a standalone module.

## Parameters

<ParamList
  items={[
{
  name: "skip_pii",
  type: "string[]",
  description: "The PII to skip.",
  enums: ["name", "dob", "address", "ssn_4"],
},
]}
/>

## Create a token

You can create an identity verification session token using one of the supported patterns:

* Existing entity: provide `entity_id` + `mode` + `identity_verification`
* Create new entity: provide `entity` + `mode` + `identity_verification`
* Resume session: provide `session_id` only (omit `mode` and `identity_verification`)

### Existing Entity

```json theme={null}
{
  "entity_id": "ent_...",
  "mode": "identity_verification",
  "identity_verification": {
    "skip_pii": ["name", "dob", "address"]
  }
}
```

### Create New Entity

```json theme={null}
{
  "entity": {
    "type": "individual",
    "individual": {
      "first_name": "Kevin",
      "last_name": "Doyle",
      "phone": "+15125551234"
    }
  },
  "mode": "identity_verification",
  "identity_verification": {
    "skip_pii": []
  }
}
```

### Response

```json theme={null}
{
  "token": "otkn_...",
  "valid_until": "2025-06-10T22:50:53.024Z",
  "session_id": "osess_..."
}
```

## Launch Opal

<Tabs>
  <Tab title="React (Web)">
    ```tsx theme={null}
    import { OpalProvider, useOpal } from "@methodfi/opal-react";

    function Screen() {
      const { open } = useOpal({ env: "dev", onEvent: (e) => {} });
      const start = async () => {
        const { token } = await getTokenFromBackend();
        open({ token });
      };
      return <button onClick={start}>Verify identity</button>;
    }
    ```
  </Tab>

  <Tab title="React Native">
    ```tsx theme={null}
    import { OpalProvider, useOpal } from "@methodfi/opal-react-native";

    function Screen() {
      const { open } = useOpal({ env: "dev", onEvent: (e) => {} });
      const start = async () => {
        const { token } = await getTokenFromBackend();
        open({ token });
      };
      return <Button title="Verify identity" onPress={start} />;
    }
    ```
  </Tab>
</Tabs>
