# Introduction

The Platform SDK is a JavaScript client SDK that lets you quickly integrate easy and secure identity experiences into your web application. It offers Fraud Prevention, biometric WebAuthn authentication, Orchestration with journeys, and more.

## Modules

The SDK is comprised of different modules. Modules are currently available for the following services:

- [Fraud Prevention](/sdk-ref/platform/modules/drs_overview)
- [Identity Verification](/sdk-ref/idvsdk/overview)
- [Orchestration](/sdk-ref/idosdk/overview)
- [WebAuthn](/sdk-ref/authnsdk/overview)


## Versioning

The Platform SDK is versioned according to the semantic versioning standard where `X.Y.Z` corresponds to `Major.Minor.Patch`. The SDK version can be specified as:

- Specific version, such as `2.0.1`
- Version range, such as `2.x` or `1.18.x`


For more information on versioning, see [Versioning](/sdk-ref/platform/versioning) and [Changelog](/sdk-ref/platform/changelog).

Important
Platform SDK v1 will no longer receive updates. The `latest` will remain frozen on the last v1 release. To receive ongoing updates, all customers are advised to upgrade to v2.x by explicitly installing a 2.x version. See [Migration guide](/sdk-ref/platform/migration).

## Installation and initialization

The Platform SDK can be installed via **CDN** or **NPM**. After loading, configure the SDK by calling `initialize()` with your client ID and module settings. For more import options, including tree-shaking, see [Installation](/sdk-ref/platform/installation).

NPM (recommended)
Install the SDK from the registry:

npm

```bash
npm install @transmitsecurity/platform-web-sdk@^2
```

yarn

```bash
yarn add @transmitsecurity/platform-web-sdk@^2
```

Then import and initialize the SDK:


```js
// Import modules
import { initialize, drs, webauthn, ido, idv } from '@transmitsecurity/platform-web-sdk';

// Initialize SDK
initialize({
  clientId: 'your-client-id',
  drs: {
    serverPath: 'https://api.transmitsecurity.io/risk-collect/' // Required: Set serverPath based on your region or custom domain
  },
  ido: {
    serverPath: 'https://api.transmitsecurity.io/ido' // Required: Set serverPath based on your region or custom domain
  },
  idv: {
    serverPath: 'https://api.transmitsecurity.io/verify' // Required: Set serverPath based on your region or custom domain
  },
  webauthn: {
    serverPath: 'https://api.transmitsecurity.io' // Required: Set serverPath based on your region or custom domain
  }
});

// Example usage after initialization
await ido.startJourney('JOURNEY_ID');
await drs.triggerActionEvent('login', { correlationId: 'id', claimedUserId: 'user_id' });
await idv.start(startToken);
await webauthn.authenticate.modal('USERNAME');
```

CDN
Add the following script tag to your HTML pages:


```html
<!-- Loads the latest SDK within major version 2 -->
<script src="https://platform-websdk.transmitsecurity.io/platform-websdk/2.x/ts-platform-websdk.js" defer="true" id="ts-platform-script"></script>
```

Then initialize the SDK after it loads:


```js
document.getElementById('ts-platform-script').addEventListener('load', async () => {
  await window.tsPlatform.initialize({
    clientId: 'your-client-id', // Client ID from app settings in the Admin Portal
    drs: {
      serverPath: 'https://api.transmitsecurity.io/risk-collect/' // Required: Set serverPath based on your region or custom domain
    },
    ido: {
      serverPath: 'https://api.transmitsecurity.io/ido' // Required: Set serverPath based on your region or custom domain
    },
    idv: {
      serverPath: 'https://api.transmitsecurity.io/verify' // Required: Set serverPath based on your region or custom domain
    },
    webauthn: {
      serverPath: 'https://api.transmitsecurity.io' // Required: Set serverPath based on your region or custom domain
    }
  });

  // Example usage after initialization
  await window.tsPlatform.drs.triggerActionEvent('login', { correlationId: 'example' });
  const isSupported = await window.tsPlatform.webauthn.isPlatformAuthenticatorSupported();
});
```

Notes
- When using multiple modules, always use a single `initialize` call.
- The SDK modules can be configured to work with a different region by setting `serverPath` for each module individually. If you're using a [custom domain](/guides/deployment/custom_domains) for your application, replace the Transmit domain (`api.transmitsecurity.io`) with your custom domain in each `serverPath` (for example, `https://your-domain.com/ido` instead of `https://api.transmitsecurity.io/ido`). For the SDK to work properly, the regions must match.


## Next steps

For other customizations, see a reference for your specific module:

- [Fraud Prevention](/sdk-ref/platform/modules/drs_overview)
- [WebAuthn authentication](/sdk-ref/authnsdk/overview)
- [Identity Verification](/sdk-ref/idvsdk/overview)
- [Orchestration](/sdk-ref/idosdk/overview)