Skip to main content
In proxy mode the SDK talks to your backend. Your backend authenticates your user, checks the request, adds your deepidv API key and forwards it. Photos still upload straight to deepidv storage, so the proxy only carries small JSON requests.

Configure the SDK

Set baseURL to your proxy and pass your app’s own user token as apiKey. The SDK sends apiKey in the x-api-key header and appends paths such as /v1/sessions/{id}/workflow to baseURL, keeping any path you include.
If your user token expires, create a new client with a fresh one before you present the next SDK view.

Endpoints to forward

Forward only what your integration uses. Everything else should get a 404 from your proxy. Uploads (PUT) go to the presigned URLs deepidv returns, not through your proxy. If your network restricts outbound traffic from devices, allow the deepidv storage host those URLs point to.

Rules your proxy should enforce

  1. Authenticate the user from the x-api-key header (your token). Reject anything else with 401.
  2. Allow-list the paths above. Reject the rest with 404.
  3. Check ownership. A session ID in the path must be one your backend created for this user. A re-verification ID must be one this user started.
  4. Pin the identity. On POST /v1/re-verifications, overwrite email with the signed-in user’s email so a user can’t re-verify as someone else.
  5. Pass responses through unchanged, including the status code and the Retry-After header. The SDK relies on them for retries and error screens.

Example: Node.js (Express)

Adapt authenticate, ownsSession and the storage calls to your app.
To support re-verification, add its routes, set email from your user on the create call, and record the re_verification_id from the response so you can check ownership of the follow-up calls.

Check it works

  • Run a workflow on a device. Your proxy logs should show GET …/workflow, POST …/workflow/start, POST …/uploads, a series of POST …/id-capture/detect, then the step submissions.
  • If the capture screen never names the card (“Ontario Driver’s License”), …/id-capture/detect isn’t reaching deepidv. See Troubleshooting.