Create the run
Call the same endpoint as for an iframe session, with"channel": "sdk":
string
required
sdk. Without it you get an iframe session.integer
required
A platform with an SDK pack. If the platform has none, the call fails with
400 and the message Platform '<id>' has no SDK pack.string
Your own reference for this run. It comes back in responses and webhooks.
integer
The run’s deadline. Defaults to 6 hours for an SDK run. A run with no result by then ends in
ERROR (below).object
Optional details about your user, stored with the run.
location, preferredRegion, notificationPlatformId, senderName and emailTemplateId. The run happens on the user’s own phone, on their own network.
If we’ve given you a check id for a verification, send
checkId in place of platformId. Send params too if the check takes inputs: a JSON object of at most 16 KiB. The response’s packId is then the check id. Pass params to your app as JSON text.The response
Hand the run to your app
Return three fields to your app over your own authenticated API. The app passes them torunTree:
Create a new run every time the user starts a verification. The SDK never retries, so an attempt that failed in the app is over. When the app reports a failure or a cancel, terminate the old run. Otherwise it waits until its deadline and fires an
ERROR webhook:
Get the result
An SDK run staysCREATED until its result arrives. Then it moves straight to a terminal status:
Use the same tools as for iframe sessions. A webhook fires on every terminal status. You can also poll
GET /partner/browser-session/{sessionId}.
For a platform with attested data, the result can arrive after the user has closed your app. The attester posts it when it finishes reading the platform, so don’t make the user wait in the app for the webhook.
When a run never reports
A run with no result by its deadline moves toERROR with errorMessage: "run did not report", and your webhook fires. That can happen when the app was closed before the SDK could hand the run off, or when the phone lost its network. The deadline is expiresInHours if you set it, and 6 hours otherwise.
What Cr3dentials checks
Before it stores a result, Cr3dentials checks:- the run’s token, and that the run is still waiting for a result;
- that the result is for the pack this run was issued for;
- for attested data, the attester’s signed claim: the signature, the trust bundle it chains to, and the policy it was signed under;
- that the attester’s receipt hasn’t already been used by another result.
