Prathamesh Musale
a349c4622d
Part of [Sumsub KYC integration in onboarding app](https://www.notion.so/Sumsub-KYC-integration-in-onboarding-app-607b598c9c1d4d12adc71725e2ab5e7e) Reviewed-on: #4 Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com> Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com> |
||
---|---|---|
bin | ||
src | ||
.env.example | ||
.gitignore | ||
Dockerfile | ||
package.json | ||
README.md | ||
tsconfig.json | ||
yarn.lock |
testnet-onboarding-api
-
Install dependencies and build:
yarn && yarn build
-
Configure required tokens:
cp .env.example .env # Set the sumsub app token and secret key in .env
-
Start the server:
yarn start
-
Usage:
curl -X POST http://localhost:3000/generate-token \ -H "Content-Type: application/json" \ -d '{"userId": "<user-id>", "levelName": "[kyc-level]", "ttlInSecs": "[token-ttl-in-secs]"}' # Optional: # levelName (default: basic-kyc-level) # ttlInSecs (default: 600)
-
Example:
curl -X POST http://localhost:3000/generate-token \ -H "Content-Type: application/json" \ -d '{"userId": "JamesBond007"}' # Expected output: # {"token":"<generated-token>"}