Errors
HTTP status codes, the body status, and when to retry.
The Identity API uses standard HTTP status codes. Every response body also
has a numeric status; errors have the reason in data.error:
{
"status": 101,
"data": { "error": "Session not found" }
}Status codes
| HTTP | status | When |
|---|---|---|
200 | 100 | Success |
201 | 100 | Created: a login session or a verification link |
400 | 105 | Missing or invalid input, e.g. Missing referenceId, webhookSecret must be 16 to 255 characters, Scopes not allowed for this business: … |
401 | 103 | Missing, wrong or deactivated clientid / clientsecret |
402 | 106 | No verification credits left (verification links) |
404 | 101 | The session or link doesn't exist, or belongs to another business |
409 | 105 | The action doesn't fit the current state, e.g. cancelling an approved link, or the EU wallet for a session that is no longer pending |
500 | 105 | Something went wrong at IDfier |
Branch on the HTTP status. data.error is a message for your logs, not
meant to be matched on.
Retrying
5xxand network errors: retry with a short backoff.4xx: don't retry the same request; fix it first. A404for a login session usually means thereferenceIdis wrong or belongs to another business client.
Session outcomes aren't errors
A session that exists returns 200, with its state in
data.session.status: pending and started mean keep polling, denied
and error mean stop, and a pending or started session past expiresAt
has expired. See Login with IDfier.