Skip to content

This a project to demonstarte the api integration of sumsub for basic kyc verification

License

Notifications You must be signed in to change notification settings

UdeeshaRukshan/Sumsub-kyc-api-node-js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project: Sumsub Integration

This project provides functions to interact with the Sumsub verification platform using Node.js.

Features:

  • Generates a Web SDK link for user verification.
  • Resets a user's verification profile (allowing them to re-verify).

Requirements:

  • Node.js and npm (or yarn) package manager.
  • A Sumsub developer account and API credentials.

Installation:

  1. Clone this repository.
  2. Install dependencies:
npm install

Configuration:

  1. Create a .env file in the project root directory.
  2. Add the following environment variables to the .env file:
  • SUMSUB_APP_TOKEN: Your Sumsub application access token.
  • SUMSUB_SECRET_KEY: Your Sumsub application secret key.

Usage: To use the client, you can run the index.js file:

npm start

Usage:

This project exports two functions:

  • generate(userId): Generates a new Web SDK link for a user with the specified userId.
  • reGenerate(userId): Resets the user's verification profile and then generates a new Web SDK link.

Example:

import { generate, reGenerate } from './sumsub';

const userId = '12345'; // Replace with your user ID

(async () => {
  try {
    const url = await generate(userId);
    console.log('Web SDK Link:', url);
  } catch (error) {
    console.error('Error generating Web SDK Link:', error);
  }

  // Alternatively, to reset and regenerate the link:
  try {
    const url = await reGenerate(userId);
    console.log('Web SDK Link:', url);
  } catch (error) {
    console.error('Error regenerating Web SDK Link:', error);
  }
})();

Notes:

About

This a project to demonstarte the api integration of sumsub for basic kyc verification

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%