Check our full documentation here https://docs.incode.com
Most modern frontend projects manage their dependencies using a package manager like npm or Yarn. To add our SDK to an existing project, the first thing you should do is install the necessary dependencies with the tool of your choice:
Using Yarn
yarn add @incodetech/welcome
Using npm
npm install @incodetech/welcome
If your project is not using React, you will need to install it; this is a dependency of the SDK.
yarn add react@^17.0.2 react-dom@^17.0.2
To initialize the SDK, you need to provide your API Key and the API URL and run the following code:
import { create } from '@incodetech/welcome';
// Get incode instance
const incode = create({
apiKey: 'myApiKey',
apiURL: 'myApiURL',
});
This will return an instance of the SDK ready for use.
After you initialize the SDK, you can use any of the methods available (see API to learn more)
// Start the camera component for the front ID
incode.renderCamera('front', container, {
onSuccess: onSuccess,
onError: onError,
});
Check our SDK API to learn more about it and how to use it. Click here to learn more.
Check our guide here