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

# SDKs & Integration

> Available SDKs and how to integrate Device Intelligence into your app

## Available SDKs

<CardGroup cols={2}>
  <Card title="Android (Kotlin)" icon="android">
    Native SDK — Kotlin detectors plus a native C layer (JNI) for the unhookable root/debugger checks. Requires NDK + CMake to build.
  </Card>

  <Card title="iOS (Swift)" icon="apple">
    Native SDK — Swift detectors using Darwin-level APIs (`sysctl`, Secure Enclave, `getifaddrs`) for the same detection categories as Android, with documented platform-parity differences.
  </Card>

  <Card title="Flutter" icon="mobile">
    A single Flutter plugin wrapping both native SDKs, with scoring and telemetry logic shared in Dart so both platforms score identically by construction.
  </Card>

  <Card title="Web (JavaScript)" icon="js">
    Browser-based fingerprinting and behavioral telemetry for web checkout/login flows — see [Beyond RASP](/device-intelligence/beyond-rasp#web-fingerprinting-browser-sessions).
  </Card>
</CardGroup>

## Getting your credentials

Every integration starts with a tenant, created from the [DI Dashboard](https://deviceintel.insightsecure.ai/di/dashboard):

<Steps>
  <Step title="Request access">
    Contact [akash@insightai.in](mailto:akash@insightai.in) or your InsightAI account contact for dashboard access.
  </Step>

  <Step title="Create a tenant">
    From **Admin → Integrations**, create a tenant for your app. This generates three credentials, shown once:

    * A **public API key** (`dpk_live_...` / `dpk_sandbox_...`) — identifies your tenant on dashboard-facing calls
    * A **private HMAC secret** — signs every telemetry payload the SDK sends; never exposed client-side beyond the SDK's own config
    * A **webhook signing secret** — verifies payloads InsightAI sends back to you
  </Step>

  <Step title="Configure the SDK">
    Pass the HMAC secret into the SDK's config at app startup — see the platform-specific snippets below.
  </Step>

  <Step title="Verify with a test evaluation">
    Run one evaluation and confirm it appears in the DI Dashboard's live telemetry feed before going further.
  </Step>
</Steps>

<Warning>
  The private HMAC secret and webhook signing secret are shown once, at creation time. Store them in your secrets manager immediately — they can't be retrieved again, only rotated.
</Warning>

## Quick integration

<CodeGroup>
  ```kotlin Android theme={null}
  InsightAiSdk.init(
      context = this,
      config = InsightAiConfig(
          tenantId = "your_tenant_id",
          ingestUrl = "https://ingest.insightsecure.ai/v1/rasp/ingest",
          hmacSecretKey = BuildConfig.INSIGHTAI_HMAC_SECRET,
          expectedApkSignatureHashes = setOf("<your release cert SHA-256>"),
      )
  )

  // Before a payment/login action:
  val evaluation = InsightAiSdk.evaluate(context)
  when (evaluation.raspAction) {
      "BLOCK"  -> showBlockedScreen()
      "REVIEW" -> proceedWithStepUpAuth()
      else     -> proceedNormally()
  }
  ```

  ```dart Flutter theme={null}
  InsightAiRasp.init(InsightAiConfig(
    tenantId: 'your_tenant_id',
    ingestUrl: 'https://ingest.insightsecure.ai/v1/rasp/ingest',
    hmacSecretKey: const String.fromEnvironment('INSIGHTAI_HMAC_SECRET'),
    expectedSignatureHashes: {'<your release cert / provisioning profile hash>'},
  ));

  // Before a payment/login action:
  final evaluation = await InsightAiRasp.evaluate();
  switch (evaluation.raspAction) {
    case 'BLOCK': showBlockedScreen(); break;
    case 'REVIEW': proceedWithStepUpAuth(); break;
    default: proceedNormally();
  }
  ```

  ```javascript Web theme={null}
  InsightAI.init({
    tenantId: 'your_tenant_id',
    publicKey: 'dpk_live_...',
  });

  await InsightAI.evaluate(); // returns { raspScore, raspAction, flags }
  ```
</CodeGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="API Authentication" icon="key" href="/api-reference/authentication">
    Full detail on key types, HMAC signing, and rotation.
  </Card>

  <Card title="Webhooks & Payload Reference" icon="webhook" href="/api-reference/webhooks-and-payload">
    Every field in the telemetry and alert payloads, explained.
  </Card>
</CardGroup>
