Web SDK Quick Guide
Leverage our UX-optimised Web SDK to quickly verify your clients.
The ComplyCube Web SDK provides a UX-optimised UI that guides your clients via our simple verification process. For video capture, clients must complete a randomised challenge, including the recital of some digits and performing a simple action.
This quick guide explains how to integrate our verification flow directly into your web application via our JavaScript Web SDK to verify the identity of your clients.
ComplyCube Web SDK Demo

Integration at a glance

Our Web SDK is quick to integrate and can be quickly dropped into your web application in 2 simple steps:

1. Generate an SDK Token

Tokens enable clients to send personal data to ComplyCube via our SDKs securely. Use the generate token endpoint to obtain an SDK token and initialise the Web SDK next.
cURL
Node.js
Python
PHP
.NET
1
curl -X POST https://api.complycube.com/v1/tokens \
2
-H 'Authorization: <YOUR_API_KEY>' \
3
-H 'Content-Type: application/json' \
4
-d '{
5
"clientId":"CLIENT_ID",
6
"referrer": "https://www.example.com/*"
7
}'
Copied!
1
const { ComplyCube } = require("@complycube/api");
2
3
const complycube = new ComplyCube({ apiKey: "<YOUR_API_KEY>" });
4
5
const token = await complycube.token.generate("CLIENT_ID", {
6
referrer: "https://www.example.com/*"
7
});
Copied!
1
from complycube import ComplyCubeClient
2
3
cc_api = ComplyCubeClient(api_key='<YOUR_API_KEY>')
4
5
token = cc_api.tokens.create('CLIENT_ID','https://www.example.com/*')
Copied!
1
use ComplyCube\ComplyCubeClient;
2
3
$ccapi = new ComplyCubeClient('<YOUR_API_KEY>');
4
5
$report = $ccapi->tokens()->generate('CLIENT_ID', 'https://www.example.com/*');
Copied!
1
using ComplyCube.Net;
2
using ComplyCube.Net.Resources.SDKTokens;
3
4
var sdkTokenApi = new SDKTokenApi(new ComplyCubeClient("<YOUR_API_KEY>"));
5
6
var sdkTokenRequest = { clientId = "CLIENT_ID" ,
7
referrer = "https://www.example.com/*" }
8
9
var sdkToken = await sdkTokenApi.GenerateToken(sdkTokenRequest);
Copied!

2. Mount the SDK

To mount our Web SDK, you need to include it on your target page, as shown below.
1
<!DOCTYPE html>
2
<html>
3
4
<head>
5
<!-- Importing the Javascript library -->
6
<script src="complycube.min.js"></script>
7
8
<!-- Importing the default CSS -->
9
<link rel="stylesheet" href="style.css" />
10
</head>
11
12
<script>
13
var complycube = {};
14
function startVerification() {
15
complycube = ComplyCube.mount({
16
token: "<YOUR_WEB_SDK_TOKEN>",
17
onComplete: function(data) {
18
console.log("Capture complete", data)
19
},
20
});
21
}
22
</script>
23
24
<body>
25
<!-- This is where the Web SDK will be mounted -->
26
<div id="complycube-mount"></div>
27
28
<!-- Clicking the button will start the ComplyCube verification UI -->
29
<button onClick="startVerification()">Start verification</button>
30
</body>
31
32
</html>
33
Copied!
The links to complycube.min.js and style.css can be found in your developers portal.

Next steps

Follow our detailed Web SDK integration guide to explore the features and customisations it offers.
Last modified 14d ago