Prerequisites
Confirm each of these before you start the Getting started flow.
Browser
A modern browser with getUserMedia and WebAssembly:
- Chrome 91 or newer
- Firefox 89 or newer
- Safari 16.4 or newer
- Edge 91 or newer
See Browser support matrix for per-feature coverage.
HTTPS
Camera access through getUserMedia is blocked on plain HTTP origins. You need one of:
- HTTPS in production.
http://localhostorhttp://127.0.0.1for local development.
ClientSecret
The SDK authenticates every backend call with a token in the Authorization: Bearer header. You need a ClientSecret issued for your integration.
Request one from your Slade ID integration contact. The ClientSecret carries your integrator identity and an expiry. Issue tokens on your server and rotate them through your normal auth refresh flow rather than hardcoding them in client code.
Private registry access
The SDK is published to https://npmjs.slade360.co.ke/. You need credentials for that registry. Configure once in your project:
npm config set registry=https://npmjs.slade360.co.ke/ --scope=@sladeidOr pass --registry on each install.
A <video> element
The capture sessions attach to an HTMLVideoElement you provide. The element must be in the DOM before you call session.start(). The element does not need to be visible — for headless capture flows you can position it off-screen — but it must exist.