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

# Mobile SDK

> Run the KYC onboarding flow natively inside your iOS and Android apps

The Legal Talent mobile SDKs run a KYC session natively inside your app: document capture, selfie and face liveness, forms, OTP and terms, using the workflow you configured in the dashboard. Your app hands the SDK a session token, the SDK drives the whole flow, and hands control back when the applicant is done.

## How it works

```mermaid theme={null}
sequenceDiagram
    participant App as Your app
    participant BE as Your backend
    participant API as KYC API
    participant SDK as Legal Talent SDK

    App->>BE: Start onboarding
    BE->>API: POST /kyc/sessions (API key)
    API-->>BE: access_token
    BE-->>App: access_token
    App->>SDK: LegalTalentFlowView(accessToken)
    SDK->>API: Public session API (token only)
    Note over SDK: Applicant completes every workflow step
    SDK-->>App: onComplete(session)
    API-->>BE: Webhook kyc.session.processed / approved / rejected
```

<Steps>
  <Step title="Your backend creates a session">
    Call [`POST /kyc/sessions`](/api-reference/sessions#create-session) with your API key and a `workflow_id`. The response contains a short-lived `access_token`.
  </Step>

  <Step title="Your app presents the flow">
    Pass the `access_token` to `LegalTalentFlowView`. The SDK loads the session and workflow, applies your branding, and walks the applicant through every step.
  </Step>

  <Step title="The SDK hands control back">
    When the applicant finishes, `onComplete` fires with the session. Dismiss the flow and show your own "we're reviewing your data" screen.
  </Step>

  <Step title="Your backend gets the decision">
    The outcome (`approved`, `rejected`, `manual_review`) arrives through [session webhooks](/api-reference/webhooks/sessions) or [`GET /kyc/sessions/{id}`](/api-reference/sessions#get-session-details).
  </Step>
</Steps>

<Warning>
  `onComplete` means the applicant **finished submitting**, not that they were approved. The SDK never makes a KYC decision. Always read the result on your backend.
</Warning>

## Security model

Your API key never ships in the app. The SDK only ever sees the session `access_token`, which is scoped to one session, expires (`ttl_days`, default 7), and can only read and submit that session through the [public session API](/api-reference/sessions-public).

<Note>
  Pass the `access_token`, not the `access_link`. The link is for the web flow.
</Note>

## Integration options

<CardGroup cols={2}>
  <Card title="Drop-in UI" icon="mobile-screen">
    `LegalTalentFlowView` (SwiftUI / Jetpack Compose). One view, the whole flow, themed with your branding. Recommended for most integrations.
  </Card>

  <Card title="Headless" icon="code">
    `LegalTalentClient` exposes session, workflow, uploads and polling for teams that build their own UI.
  </Card>
</CardGroup>

## Modules

| iOS product (SPM)                     | Android artifact (Maven)                         | Purpose                         |
| ------------------------------------- | ------------------------------------------------ | ------------------------------- |
| `LegalTalentUI`                       | `ai.legaltalent.sdk:legaltalent-ui`              | Drop-in flow, theming, en/es/pt |
| `LegalTalentCore`                     | `ai.legaltalent.sdk:legaltalent-core`            | Headless client and models      |
| `LegalTalentLiveness`                 | `ai.legaltalent.sdk:legaltalent-liveness`        | Face liveness (AWS Amplify)     |
| (part of Core)                        | `ai.legaltalent.sdk:legaltalent-forensics`       | On-device document forensics    |
| `LegalTalentNFC` / `LegalTalentNFCUI` | `ai.legaltalent.sdk:legaltalent-nfc` / `-nfc-ui` | eMRTD chip reading              |

The drop-in UI module pulls in Core and Liveness; you only declare `LegalTalentUI` / `legaltalent-ui`.

## Platform support

|                                                       | iOS                   | Android                 |
| ----------------------------------------------------- | --------------------- | ----------------------- |
| Minimum OS                                            | iOS 15                | API 26 (Android 8.0)    |
| UI toolkit                                            | SwiftUI               | Jetpack Compose         |
| Distribution                                          | Swift Package Manager | GitHub Packages (Maven) |
| [Zero-retention sessions](/mobile-sdk/zero-retention) | Yes                   | Not yet                 |
| Exit button (`onExit`) and header/attribution toggles | Yes                   | Not yet                 |

## Next steps

<CardGroup cols={2}>
  <Card title="iOS" icon="apple" href="/mobile-sdk/ios">
    Install with SPM and present the flow.
  </Card>

  <Card title="Android" icon="android" href="/mobile-sdk/android">
    Install from GitHub Packages and present the flow.
  </Card>

  <Card title="Customization" icon="palette" href="/mobile-sdk/customization">
    Branding, dark mode, header and capture options.
  </Card>

  <Card title="Reference" icon="book" href="/mobile-sdk/reference">
    Parameters, callbacks, errors and versioning.
  </Card>
</CardGroup>
