Mobile SDK Quick Guide
Our smart mobile SDKs provide assisted guidance to your clients.
Our Mobile SDKs come with intelligent, user-friendly user interfaces that walk your clients through a configurable verification process.
By passing custom configuration to the SDK on launch, you can define the flow you would like your clients to complete at runtime.

Integration at a glance

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 initialize the SDK.
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": "APPLICATION_ID"
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: "APPLICATION_ID"
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','APPLICATION_ID')
Copied!
1
use ComplyCube\ComplyCubeClient;
2
3
$ccapi = new ComplyCubeClient('<YOUR_API_KEY>');
4
5
$token = $ccapi->tokens()->generate('CLIENT_ID', 'APPLICATION_ID');
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", referrer = "APPLICATION_ID" }
7
8
var sdkToken = await sdkTokenApi.GenerateToken(sdkTokenRequest);
Copied!

2. Configure the SDK

Initialize the SDK with the previously generated token and your Client ID. This enables the SDK to securely send your clients information directly to their client record.
Swift
Kotlin
1
sdk.token = "SDK_TOKEN"
2
sdk.clientId = "CLIENT_ID"
3
4
let documentStage = DocumentStageBuilder()
5
.setAllowedDocumentTypes(types: [ .passport,
6
.nationalIdentityCard()])
7
.useLiveCaptureOnly(enable: false)
8
.build()
9
10
let selfieStage = BiometricStageBuilder()
11
.setType(type: BiometricType.video)
12
.build()
13
14
sdk.availableScreens = [selfieStage, documentStage]
15
sdk.start(with: self)
Copied!
1
val sdk = setupComplyCubeSdkLauncher("SDK_TOKEN",
2
{
3
setStages(
4
Welcome(),
5
Document(Passport(), NationalIdentityCard()),
6
SelfiePhoto(),
7
Complete()
8
)
9
}, callback = this::callbackHandler)
Copied!

3. Perform Checks

Using theSDKResult object returned by the SDK, you can trigger your backend to run the necessary checks on your client. For example, use;
  • SDKResult.Success.DocumentId to run a document check
  • SDKResult.Success.DocumentId and SDKResult.Success.LivePhotoId to run an identity check