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.
The SDK is comprised of different modules. Modules are currently available for the following services:
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.xor1.18.x
For more information on versioning, see Versioning and Changelog.
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 by explicitly installing a v2 version. See Migration guide.
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.
Install the SDK from the registry:
npm install @transmitsecurity/platform-web-sdk@^2Then import and initialize the SDK:
// 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');- When using multiple modules, always use a single
initializecall. - The SDK modules can be configured to work with a different region by setting
serverPathfor each module individually. If you're using a custom domain for your application, replace the Transmit domain (api.transmitsecurity.io) with your custom domain in eachserverPath(for example,https://your-domain.com/idoinstead ofhttps://api.transmitsecurity.io/ido). For the SDK to work properly, the regions must match.
For other customizations, see a reference for your specific module: