Skip to main content
Web capture

Take the person through the capture in a browser, using the token and link returned by Human Plugin.

Markdown

Your back-end creates the process in Human Plugin with a Journey flow. The 201 response has three values the front-end needs:

FieldUsed for
idThe Human Plugin process id. The SDK takes it as transactionId, and your back-end reads the outcome with it
tokenStarts the capture in the Journeys SDK
linkThe hosted capture page

token and link are returned only by the create. Pass them to the front-end in the same request, or store them yourself. See Human Token Journey.

Requirements​

The capture runs in the browser and needs camera access.

OSChromeFirefoxSafariSamsung InternetOperaEdge
Windows✅✅N/AN/A❌❌
macOS✅✅✅N/A❌❌
Android✅❌N/A✅❌❌
iOS✅✅✅N/A❌❌
  • Pages must be served over HTTPS. The camera only works in a secure context.
  • In-app browsing needs Android 8 (API 26) or iOS 13 or later.
  • Browsers inside social-network apps are not supported.

Choose a model​

ModelBest for
Hosted linkThe simplest setup. No library: the person goes to the link and comes back to your callbackUri
Journeys SDKThe capture opens inside your page, so the person never leaves it

Send callbackUri in the create request. It is the page the person returns to when the capture ends.

{
"flow": "humantoken",
"clientId": "client-a",
"correlationId": "order-1001",
"credential": { "type": "DUI_TYPE_NG_BVN", "value": "<document number>" },
"callbackUri": "https://app.example.com/capture/done"
}

Then send the person to link, in one of two ways:

  • Redirect. Navigate to link. At the end, the person is sent back to callbackUri.
  • New tab. Open link with window.open(), watch for the tab to reach callbackUri, and close it.

When the person is back, tell your back-end, which calls GET /v1/processes/{id}.

Testing

Close the browser DevTools before you test a capture end to end. An open DevTools blocks the submission.

Unsupported setups
  • The SDK inside a mobile WebView. In an app, open the link instead. See the Android, iOS, Ionic, React Native and Flutter guides.
  • Your own <iframe> pointing to the capture. Use the SDK, which manages the iFrame.