Testing without a camera
With a test key (rk_test_…) you can pass simulate to POST /v1/sessions. The session runs the workflow’s real evaluation on the outcomes you choose and comes back already completed. No one opens the hosted page.
simulate maps a step id to an outcome:
| Step type | Values |
|---|---|
gestures, light, id_portrait |
passed, inconclusive, failed, capture_error; also skipped for light, unless its skip setting is off |
name_match, id_expiry, id_barcode |
passed, inconclusive, failed |
face_match |
a band: strong, possible, weak |
Steps you leave out pass.
curl https://api.rightful.id/v1/sessions \ -H "Authorization: Bearer $RIGHTFUL_KEY" -H 'Content-Type: application/json' \ -d '{"workflow": "onboarding-id", "subject_ref": "qa-1", "simulate": {"match": "weak"}}'A simulated session is evaluated as a single attempt: where the workflow would retry, the simulation ends in review instead.
- A live key with
simulategets422 SIMULATE_TEST_MODE_ONLY. - An unknown step id or a value not allowed for that step gets
422 SIMULATE_INVALID. - Simulated sessions are counted in your test-mode usage, like any other.
To try the real flow yourself, create a session without simulate and open its url on a laptop with a camera, then on a phone. The phone handoff for the ID photo is only offered over HTTPS.
Things worth trying on a real device:
- Skipping the light check. “Skip the light check” sits under the consent box, and pressing Stop during the light check also counts as skipping it. Either way the check carries on to the ID, and the session goes to review with the reason
light_skipped(unless the light step’sskipsetting says otherwise). - Several cameras. On a computer or tablet with more than one camera, a camera choice appears during the ID step. Virtual cameras such as OBS are left out of it. A camera that shows no picture (another app is using it) brings up a warning, and the page reconnects it when you come back to the page.
- The phone handoff from a computer or tablet. “Use my phone instead” sits beside Stop camera while the ID is being captured.
- Focus. Tap the picture to focus, where the browser allows it (Chrome on Android, and most computers). iPhones focus by themselves.