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 risk detection and response, biometric WebAuthn authentication, and more to come.

The entry point to the SDK API is set as the window.tsPlatform property.

Note

The Platform SDK includes all the functionality of the older Detection and Response SDK and WebAuthn SDK. Those Web SDKs are still supported for existing integrations, but new features will only be supported by the Platform SDK.

Modules

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

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 1.6.20
  • Version range, such as 1.x or 1.6.x
  • Latest

For more information on versioning, see Versioning and Changelog.

Installation

To load the SDK, include the following HTML script tag in all the relevant pages of your front-end web application:

Copy
Copied
<!-- This loads the latest SDK within the major version 1. Specify a different version if necessary -->
<script src="https://platform-websdk.transmitsecurity.io/platform-websdk/1.x/ts-platform-websdk.js" defer="true" id="ts-platform-script"></script>

Then add the code below to wait for the SDK loading event:

Copy
Copied
document.getElementById('ts-platform-script').addEventListener('load', () => {
  // do here things with `tsPlatform`
});

Initialization

Configure the SDK globally for all the modules by calling the initialize() SDK method, as in the example below.

Copy
Copied
// Configures the SDK with your client.
tsPlatform.initialize({ clientId: [CLIENT_ID] });

initialize

initialize(params): void

Creates a new SDK instance with your client context, and other optional parameters for the modules you want to use. Once initialized, the SDK automatically starts to collect and submit telemetry data to Transmit to allow risk detection and response (unless this behavior is disabled).

Parameters

Name Type
params InitConfigParams

Returns

void