@alloyidentity/web-sdk
v2.8.0
Published
Alloy Web Document SDK
Downloads
84,328
Keywords
Readme
🔐 Alloy SDK
Alloy helps top banks and fintechs make better decisions using a single API and dashboard to manage KYC/AML, fraud, and more.
Installation
For npm users:
npm install @alloyidentity/web-sdkFor pnpm users:
pnpm add @alloyidentity/web-sdkFor yarn users:
yarn add @alloyidentity/web-sdkDocumentation
https://developer.alloy.com/public/docs/document-verification-web-sdk
Local Testing
Follow the steps below to run the SDK locally!
Install dependencies
From the repository root:
npm installInit Params
Edit the example/src/App.jsx file with the appropriate init params:
const alloyInitParams = {
key: '<your-sdk-key>',
journeyToken: '<your-journey-token>',
journeyApplicationToken: '<your-journey-application-token>',
};Environment and API targets
By default the SDK points to Alloy's hosted endpoints (see src/config.ts):
- SDK UI (iframe):
https://alloysdk.alloy.co/ - API:
https://docv-prod-api.alloy.co/
Override these in alloy.init() when testing against a specific Alloy environment:
const alloyInitParams = {
key: '<your-sdk-key>',
journeyToken: '<your-journey-token>',
journeyApplicationToken: '<your-journey-application-token>',
apiUrl: 'https://corekube-dev-alloysdk.api.alloy.com/',
appUrl: 'https://corekube-dev-alloysdk.app.alloy.com/',
};Run the SDK in a browser
The example/ app is a small React app that loads the local SDK build via "alloy": "file:..".
To run the example app from the repository root:
npm run build
cd example
npm install
npm start