### Install and Start Web Project
Source: https://developer.transmitsecurity.com/guides/orchestration/code_generation
Install project dependencies and start the web application.
```bash
npm install && npm start
```
--------------------------------
### Initialize Web SDK with HTML
Source: https://developer.transmitsecurity.com/guides/verify/quick_start_web_sdk
This example shows how to load and initialize the Web SDK using a script tag in an HTML file. It includes basic callback definitions and event listeners for starting the verification process.
```html
IDV Demo
```
--------------------------------
### Initialize Platform SDK with NPM
Source: https://developer.transmitsecurity.com/sdk-ref/platform/introduction
Import and initialize the Platform SDK with your client ID and module-specific server paths after installing via NPM. This example shows initialization for multiple modules.
```javascript
// 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');
```
--------------------------------
### Start Journey in Kotlin
Source: https://developer.transmitsecurity.com/guides/user/auth_face
Initiate an authentication journey using Kotlin. This example requires the journey ID, start journey options, and a callback function.
```kotlin
TSIdo.startJourney("YOUR_JOURNEY_ID", startJourneyOptions, callback)
```
--------------------------------
### Start Verification with Smart UI (Kotlin)
Source: https://developer.transmitsecurity.com/guides/verify/quick_start_mosaic_ui_android
Initiate the verification process on the client side using the 'startWithSmartUI()' SDK method. Pass the 'start_token' obtained from the backend to guide the user through the Mosaic experience.
```kotlin
TSIdentityVerification.startWithSmartUI("CONTEXT", "START_TOKEN");
```
--------------------------------
### Initiate LINE Login Flow
Source: https://developer.transmitsecurity.com/guides/user/auth_line
Use this GET request to start the LINE authentication process. Set `create_new_user` to true to allow new user creation if not found. Ensure `redirect_uri` and `client_id` are correctly configured.
```shell
curl --request GET \
--url 'https://api.transmitsecurity.io/cis/v1/auth/line?\
client_id=2eb840f.test.Transmit.io&\
redirect_uri=https://www.example.com/login&\
create_new_user=true' \
--header 'Accept: application/json'
```
--------------------------------
### Install Platform SDK via NPM
Source: https://developer.transmitsecurity.com/sdk-ref/platform/introduction
Install the latest SDK version 2.x using NPM. This is the recommended installation method.
```bash
npm install @transmitsecurity/platform-web-sdk@^2
```
```bash
yarn add @transmitsecurity/platform-web-sdk@^2
```
--------------------------------
### Initiate OIDC Authorization Request
Source: https://developer.transmitsecurity.com/guides/user/auth_oidc
Send a GET request to the /oidc/auth endpoint to start the OIDC authorization code flow. This example demonstrates parameters for logging in with Google, requesting user consent, and automatically creating a new user if one doesn't exist.
```http
https://api.transmitsecurity.io/cis/oidc/auth?\
client_id=CLIENT_ID&\
scope=openid%20email%20offline_access&\
response_type=code&\
redirect_uri=REDIRECT_URI&\
prompt=consent&\
acr_values=urn:transmit:google_direct&\
createNewUser=true
```
--------------------------------
### Get User Count Response Example
Source: https://developer.transmitsecurity.com/openapi/user/user.openapi/other/getusers
Example JSON response when successfully retrieving the user count.
```JSON
{
"result": {
"user_count": 0
}
}
```
--------------------------------
### Initialize SDK with mandatory serverPath (v2.x)
Source: https://developer.transmitsecurity.com/sdk-ref/platform/migration
Example of initializing the SDK in v2.x, demonstrating the mandatory `serverPath` for the `ido` module.
```js
await initialize({
clientId: 'your-client-id',
ido: {
serverPath: 'https://api.transmitsecurity.io/ido' // Required
}
});
```
--------------------------------
### Initialize SDK with SDK Parameters (Java)
Source: https://developer.transmitsecurity.com/guides/risk/quick_start_android
Initialize the SDK directly with your client ID and base URL as parameters. Replace placeholders with your actual credentials.
```java
public class MyApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
TSAccountProtection.initialize(this, "[BASE_URL]", "CLIENT_ID");
}
}
```
--------------------------------
### Get All Token Signing Keys Response Example
Source: https://developer.transmitsecurity.com/openapi/user/apps.openapi/other/deleteappclient
Example JSON response for retrieving signing keys, showing the structure of a single signing key object.
```json
[
{
"id": "string",
"app_id": "string",
"tenant_id": "string",
"kid": "string",
"name": "string",
"status": "signing",
"source": "global",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_at": "2019-08-24T14:15:22Z"
}
]
```
--------------------------------
### Initialize SDK using parameters (Java)
Source: https://developer.transmitsecurity.com/guides/verify/quick_start_mosaic_ui_android
Configure the SDK directly with the application context and client ID in your `Application` class. Useful for dynamic configuration.
```java
public class MyApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
TSIdentityVerification.initialize(this, "CLIENT_ID")
}
}
```
--------------------------------
### Start Verification Session
Source: https://developer.transmitsecurity.com/guides/verify/quick_start_android
Initiate the verification process by calling the start() SDK method. Pass the start_token obtained from session creation. This guides the user through the identity verification flow.
```kotlin
TSIdentityVerification.start(context, "START_TOKEN")
```
```java
TSIdentityVerification.start(context, "START_TOKEN");
```
--------------------------------
### Initialize SDK with serverPath (v1)
Source: https://developer.transmitsecurity.com/sdk-ref/platform/migration
Example of initializing the SDK in v1 where `serverPath` was optional for the `ido` module.
```js
await initialize({
clientId: 'your-client-id',
ido: {
// serverPath was optional, defaulted to US region
}
});
```
--------------------------------
### Get User Device Keys Response Example
Source: https://developer.transmitsecurity.com/openapi/user/user.openapi/other/getuserbyexternaluserid
Example of a successful response when retrieving a user's device keys. This includes status, display name, creation, and update timestamps.
```json
{
"result": {
"status": "Active",
"display_name": "string",
"custom_data": {},
"push_config": { … },
"key_id": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
}
```
--------------------------------
### Initialize SDK with Parameters
Source: https://developer.transmitsecurity.com/guides/orchestration/getting-started/quick_start_android
Configure and initialize the SDK directly using provided parameters for client ID and base URL.
```kotlin
// Initializes SDK where application_context is an object inheriting from Application class
TSIdo.initializeSDK(application_context,
clientId,
TSIdoInitOptions(baseUrl)) // Default is https://api.transmitsecurity.io
```
--------------------------------
### Initialize SDK using Parameters
Source: https://developer.transmitsecurity.com/guides/verify/quick_start_mosaic_ui_ios
Configure the SDK directly using parameters, specifying your client ID. This method is an alternative to using a PLIST file.
```swift
TSIdentityVerification.initialize(clientId: [CLIENT_ID])
```
--------------------------------
### List Users with GET Request
Source: https://developer.transmitsecurity.com/guides/user/manage_users_scim
Use this snippet to retrieve a paginated list of users via a GET request. Specify the starting index, count, and desired attributes. Ensure you have a valid client access token.
```javascript
import fetch from 'node-fetch';
async function run() {
const query = new URLSearchParams({
startIndex: '1', // 1-based index. Controls paging. The serial number of the element to start fetching
count: '100', // Controls paging. The number of records to return per page. If set to 0 or undefined, no records will be returned
attributes: ['userName', 'id', 'name.familyName', 'emails'], // The attributes to return
}).toString();
const resp = await fetch(
`https://api.transmitsecurity.io/cis/scim/Users?${query}`,
{
method: 'GET',
headers: {
Accept: 'application/scim+json',
Authorization: 'Bearer [CLIENT_ACCESS_TOKEN]'
}
}
);
const data = await resp.text();
console.log(data);
}
run();
```
--------------------------------
### Get device key
Source: https://developer.transmitsecurity.com/openapi/user/device-key.openapi
Retrieves a specific device key. For example, this can be used to verify that the device key exists and is active.
```APIDOC
## GET /v1/users/{user_id}/device-keys/{key_id}
### Description
Retrieves a specific device key. For example, this can be used to verify that the device key exists and is active.
### Method
GET
### Endpoint
/v1/users/{user_id}/device-keys/{key_id}
### Parameters
#### Path Parameters
- **user_id** (string) - Required - The ID of the user.
- **key_id** (string) - Required - The ID of the device key to retrieve.
### Response
#### Success Response (200 OK)
- **key_id** (string) - The unique identifier for the device key.
- **user_id** (string) - The ID of the user associated with the device key.
- **friendly_name** (string) - The user-friendly name of the device.
- **created_at** (string) - The timestamp when the device key was registered.
- **metadata** (object) - Custom metadata associated with the device.
#### Response Example
{
"key_id": "dkey_abc123",
"user_id": "usr_xyz789",
"friendly_name": "My iPhone",
"created_at": "2023-10-27T10:00:00Z",
"metadata": {
"os_version": "iOS 17.1"
}
}
```
--------------------------------
### Initialize SDK using strings.xml
Source: https://developer.transmitsecurity.com/guides/orchestration/getting-started/quick_start_android
Configure your client ID and base URL in strings.xml for SDK initialization. Use this method for recommended string-based configuration.
```xml
[YOUR_CLIENT_ID][YOUR_BASE_URL]
```
--------------------------------
### Launch Kafka Connect Worker
Source: https://developer.transmitsecurity.com/guides/user/platform/integrate_transmit_kafka-connect
Start the Kafka Connect worker process in the background. This command is part of the Docker setup for running the connector.
```bash
/etc/confluent/docker/run &
```
--------------------------------
### Initialize SDK using Direct Parameters
Source: https://developer.transmitsecurity.com/guides/orchestration/getting-started/quick_start_ios
Configure the SDK directly using client ID and server path parameters in your Swift code.
```swift
TSIdo.initialize(
clientId: Env.clientId,
options: .init(serverPath: Env.baseUrl)
)
```
--------------------------------
### Example request headers for validation challenge
Source: https://developer.transmitsecurity.com/guides/user/use_custom_sms_provider
These headers are sent by the platform to validate your GET endpoint. Ensure your endpoint can parse these headers, especially X-Verification-Key.
```shell
Accept: application/json, text/plain, */* \
content-length: 0 \
Host: example.com \
# API Key for endpoint registration (see step 3)
X-API-Key: abcd1234-0fae-4ce6-97c4-ca9ad4123b0d \
X-Scheme: https \
X-Verification-Key: AbCdZ3hJxx826qTmvwepy \
```
--------------------------------
### Initialize SDK using strings.xml (Java)
Source: https://developer.transmitsecurity.com/guides/verify/quick_start_android
Configure the SDK by adding client ID and base URL to your application's strings.xml. This is the recommended initialization method.
```xml
"CLIENT_ID"https://api.transmitsecurity.io/
```
```java
public class MyApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
TSIdentityVerification.initializeSDK(this)
}
}
```
--------------------------------
### Example GET endpoint for validation challenge
Source: https://developer.transmitsecurity.com/guides/user/use_custom_sms_provider
This endpoint handles the validation challenge from the platform. It extracts the X-Verification-Key from the request headers and echoes it back in the JSON response.
```javascript
app.define('/send-sms','GET', function(req, res) {
// Retrieve the header value.
var key = req.get("X-Verification-Key");
// API key you register in step 3.
var my_api_key = "abcd1234-0fae-4ce6-97c4-ca9ad4123b0d";
// Make sure that the API key in the request is the same you specify in step 3.
if (req.get("X-API-Key") != my_api_key) { return res.send(400, "Invalid request"); }
// Set the response type.
res.type('application/json');
// Set the status code of the response.
res.status(200);
// Send the key value in the response body.
res.json({ "key": key });
}
```
--------------------------------
### Get All Token Signing Keys cURL Example
Source: https://developer.transmitsecurity.com/openapi/user/apps.openapi/other/deleteappclient
Use this cURL command to retrieve a list of all token signing keys associated with an application. Requires an Authorization header.
```curl
curl -i -X GET \
https://api.sbx.transmitsecurity.io/cis/v1/applications/signing-keys \
-H 'Authorization: Bearer '
```
--------------------------------
### Initialize SDK using parameters (Kotlin)
Source: https://developer.transmitsecurity.com/guides/verify/quick_start_mosaic_ui_android
Configure the SDK directly with the application context and client ID in your `Application` class. Useful for dynamic configuration.
```kotlin
class MyApplication: Application() {
override fun onCreate() {
super.onCreate()
TSIdentityVerification.initialize(this, "CLIENT_ID")
}
}
```
--------------------------------
### Initialize SDK with SDK Parameters
Source: https://developer.transmitsecurity.com/guides/user/be_auth_biometrics_android
Configure the SDK directly using parameters for client ID and base server URL within your Application class. The SDK uses a default URL if none is provided.
```kotlin
// Initializes SDK
class YourApplication: Application() {
override fun onCreate() {
super.onCreate()
TSAuthentication.initialize(this,
CLIENT_ID,
BASE_SERVER_URL)
}
}
```
--------------------------------
### Initialize a Compute@Edge Project
Source: https://developer.transmitsecurity.com/assets/quick_start_fastly.9223b44a519027bdc05865cf4100dc14af1950af1d0ac2c47728c45980cc61f3.433d1fa6.md
Use this command to set up a new Compute@Edge project for Fraud Prevention integration. Ensure you have Fastly CLI installed and configured.
```shell
fastly compute init
```
--------------------------------
### Initialize SDK with Locale (Kotlin)
Source: https://developer.transmitsecurity.com/guides/orchestration/getting-started/localization
Initialize the SDK with a locale obtained from the device. This example includes a helper function to get the current locale, supporting different Android API levels.
```kotlin
val locale = getCurrentLocale().toString()
TSIdo.initializeSDK(context, "[CLIENT_ID]", TSIdoInitOptions("[BASE_URL]", "[POLLING_TIMEOUT]", "[RESOURCE_URI]", locale))
...
fun getCurrentLocale(): Locale {
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
// Get the primary locale from the current LocaleList
LocaleList.getDefault().get(0)
} else {
// Fallback for older devices
Locale.getDefault()
}
}
```
--------------------------------
### Initialize SDK
Source: https://developer.transmitsecurity.com/guides/user/sso_orchestration/sso_quickstart_selfhosted_ui
Initializes the SDK with your client ID and server path. This configures the SDK for your client context and allows setting the base URL.
```javascript
// If you're using the SDK via script tag instead of an import, call:
// window.tsPlatform.initialize({ ... })
import { initialize } from '@transmitsecurity/platform-web-sdk';
import { ido } from '@transmitsecurity/platform-web-sdk';
// Initialize the SDK with your client ID and server path
initialize({
clientId: 'my-client-id', // Client ID from app settings in the Admin Portal
ido: {
serverPath: 'https://api.transmitsecurity.io/ido' // Required: Set serverPath based on your region or custom domain
}
});
```
--------------------------------
### cURL Example for Get User by Identifier
Source: https://developer.transmitsecurity.com/openapi/user/user.openapi/other/getuserbyexternaluserid
Use this cURL command to retrieve user details by providing an identifier name and value. Ensure you replace placeholders with actual values and your authorization token.
```bash
curl -i -X GET \
'https://api.sbx.transmitsecurity.io/cis/v1/users/identifier?identifier_name=string&identifier_value=string' \
-H 'Authorization: Bearer '
```
--------------------------------
### App Client Configuration Example
Source: https://developer.transmitsecurity.com/openapi/user/apps.openapi/other/deleteappclient
This snippet shows an example of the configuration for an app client, including authentication methods and ID token encryption settings. It is useful for understanding the structure of client configurations.
```json
{
"authentication_configuration": {
"method": "client_secret_basic",
"tls_client_auth": {
"certificate_chain": "string",
"distinguished_name": 6,
"ocsp_on": true,
"ocsp_responder_uri": "string",
"ocsp_responder_certificate": "string",
"ocsp_fail_open": true
},
"isMtlsCertTokenBound": true,
"jwks": {}
},
"id_token_encryption": {
"enabled": false,
"jwks": {}
}
}
```
--------------------------------
### Initialize SDK using strings.xml (Kotlin)
Source: https://developer.transmitsecurity.com/guides/verify/quick_start_android
Configure the SDK by adding client ID and base URL to your application's strings.xml. This is the recommended initialization method.
```xml
"CLIENT_ID"https://api.transmitsecurity.io/
```
```kotlin
class MyApplication: Application() {
override fun onCreate() {
super.onCreate()
TSIdentityVerification.initializeSDK(this)
}
}
```
--------------------------------
### Get device key
Source: https://developer.transmitsecurity.com/_bundle/openapi/user/device-key.openapi.json?download=
Retrieves a specific device key. For example, this can be used to verify that the device key exists and is active. Required permissions include `apps:read`, `[appId]:read`, `devices:read`.
```APIDOC
## GET /v1/users/{user_id}/device-keys/{key_id}
### Description
Retrieves a specific device key. For example, this can be used to verify that the device key exists and is active.
**Required permissions**: `apps:read`, `[appId]:read`, `devices:read`.
### Method
GET
### Endpoint
/v1/users/{user_id}/device-keys/{key_id}
#### Path Parameters
- **user_id** (string) - Required - ID of the user
- **key_id** (string) - Required - ID of the device key
```
--------------------------------
### Start Verification Session on Client
Source: https://developer.transmitsecurity.com/guides/verify/quick_start_web_sdk
Initiate the verification process on the client-side using the `start()` SDK method and the `start_token` obtained from the backend. This will display the verification UI to the user.
```javascript
idv.start(startToken);
```
--------------------------------
### Session Creation Response Example
Source: https://developer.transmitsecurity.com/guides/verify/quick_start_web
The response from creating a session includes a start token to initiate verification on the client side, a session ID, an expiration time, and an array of images that need to be captured during the verification process.
```json
{
// Use the start token to start the verification on the client side
"start_token": "abcd6ed78c8c0b7824dfea356ed30b72",
"session_id": "EXAMPLEskjzsdhskj4",
"expiration": "2023-12-27T11:59:07.420Z",
// Array of images to capture
"missing_images": [
"document_front",
"document_back",
"selfie"
]
}
```
--------------------------------
### Initialize Web SDK
Source: https://developer.transmitsecurity.com/guides/orchestration/getting-started/quick_start_web
Import and initialize the Orchestration module with your client ID and server path. Ensure the `serverPath` is set correctly for your region or custom domain.
```javascript
// If you're using the SDK via script tag instead of an import, call:
// window.tsPlatform.initialize({ ... })
import { initialize, ido } from '@transmitsecurity/platform-web-sdk';
// Initialize the SDK with your client ID and server path
initialize({
clientId: 'my-client-id', // Client ID from app settings in the Admin Portal
ido: {
serverPath: 'https://api.transmitsecurity.io/ido' // Required: Set serverPath based on your region or custom domain
}
});
```