shareCode the widget returns for that user’s claims.
There are two flow types:
1. Create the flow
In the Dojah app, open EasyOnboard and create a Vouch widget. Choose one type:- Verification — select the identity claims the user must share (for example the government data your onboarding requires). The retrieve-claims response includes only what this flow requests.
- Authentication — the flow asks the user to share basic profile info. Use this for sign-in or account matching. The response includes email and name.
widget_id. From Developers, copy the same app’s App ID and secret key. Keep the secret key on your server. See Authentication.
2. Launch the widget
Load the KYC widget and open the published Vouch flow.type is vouch for both verification and authentication. type is the only attribute that changes compared to the default widget flow.
HTML
onSuccess means the user granted access and the widget returned a shareCode. onError and onClose mean there is no share code — do not create a session from those events.
Post shareCode to your backend over HTTPS as soon as you receive it. The browser must not call the claims API.
3. Exchange the share code
Call this from your server with the app’s secret key. Send the key raw inAuthorization — not as Bearer.
cURL
Sandbox uses the same path on a different host. While testing, call
https://sandbox.dojah.io/api/v1/vouch/request/claims with sandbox keys. See Environments.5xx responses up to 3 times with exponential backoff. Do not retry 4xx responses.
Response
Response
entity.status is "approved". Any other status means the user did not grant the request — do not sign them in or mark them verified.
Treat a missing field your flow requires as a failed grant, the same as a non-approved status.
4. Use the claims
Authentication. Look up your user byclaims.basic_info.email. If the email is absent, stop. Update the stored name from claims.bio_data when those fields are present, then issue your own session.
Verification. Map claims onto the checks your verification flow requested, then store the result against your own user id and the reference_id you passed into the widget. Do not treat the widget callback as a passed KYC check.