Initialize Session

For a user to go through ZeroKYC you must first fetch a valid session token.

Note: Each session token is short-lived and used to establish the authenticity throughout the session

Get Session Token

To get a session token, your application's server can make an API request to Verisoul like below. Note, for security, best practice is to fetch the session token from a protected server, not on the client.


try {
    // Create a session token via Verisoul's API
    let response = await fetch('', {
        method: 'GET',
        x-api-key: {VERISOUL_API_KEY}

    if (!response.ok) {
        throw new Error(`failed to create Verisoul session: ${response.status}`);

    let {session_id} = await response.json();
} catch (err) {

Last updated