Skip to main content

Generate KYB token

Requirements
  • API key pair
  • Custom flow created via dashboard
  • Token generation via API enabled (done by iDenfy's staff)
  • Finances

KYB Integration Schema

Step 1: Generate KYB form token

Generate KYB form token

Generate KYB form token

Authorizations:
API key pair
Request Body schema: application/json
tokenType
required
string (KybTokenTypeEnum)
lifetime
integer [ 0 .. 2592000 ]
Default: 3600

The duration in seconds of KYB token validity.

clientId
required
string [ 1 .. 100 ] characters

A unique string identifying a client on your side.

externalRef
string or null <= 40 characters

Any additional value chosen by you.

(KybLocaleEnum (string or null)) or (NullEnum (any or null))

The default client's language. By default selected by a client's IP address.

flow
string or null <uuid>

KYB flow's id to use for this KYB session.

theme
string or null <uuid>

KYB theme's id to use for this KYB session.

questionnaire
string or null non-empty

KYB questionnaire's key to use for this KYB session. null for no questionnaire. If not given, the default questionnaire (from your KYB settings) will be used. Ignored when KYB flow is used, then questionnaire is taken according to used flow.

questionnaireRequired
boolean
Default: true

If KYB session should have a questionnaire.

tags
Array of strings <= 5 items [ items [ 1 .. 32 ] characters ^[^,]+$ ]
Default: []

List of case-sensitive strings. Each tag can not be longer than 32 characters.

scanRefs
Array of strings or null[ items [ 1 .. 40 ] characters ^[^,]+$ ]

Responses

Request samples

Content type
application/json
{
  • "tokenType": "FORM",
  • "lifetime": 3600,
  • "clientId": "string",
  • "externalRef": "string",
  • "locale": "en",
  • "flow": "92fe31c9-39b9-47ea-906d-cf09a4c3fa9a",
  • "theme": "ae73a642-7a1e-4322-b101-b4b3a53eb8f5",
  • "questionnaire": "string",
  • "questionnaireRequired": true,
  • "tags": [ ],
  • "scanRefs": [
    ]
}

Response samples

Content type
application/json
{
  • "tokenType": "FORM",
  • "tokenString": "string",
  • "expiration": "2019-08-24T14:15:22Z",
  • "isActive": true,
  • "isValid": true,
  • "clientId": "string",
  • "externalRef": "string",
  • "locale": "en",
  • "flow": "92fe31c9-39b9-47ea-906d-cf09a4c3fa9a",
  • "theme": "ae73a642-7a1e-4322-b101-b4b3a53eb8f5",
  • "tags": [ ],
  • "scanRefs": [
    ]
}

Step 2: Creating Company

Once the token is generate you can either:

how-to

To redirect the user to the iDenfy KYB UI, construct the redirect URL as follows:

  1. Start with the base URL
  2. Obtain the tokenString value from the new KYB token response.
  3. Append this tokenString value directly to the end of the base URL: https://kyb.ui.idenfy.com/welcome?authToken=

Example:

If the tokenString received from the API is 9TIMoX4oSVmWDJ8qS7zeFUMTh5hi1EcqqLTrPR9r, the complete redirect URL will be:

https://kyb.ui.idenfy.com/welcome?authToken=9TIMoX4oSVmWDJ8qS7zeFUMTh5hi1EcqqLTrPR9r