Authenticated with your normal sajn API key, scoped
login:write and login:read. See
Authentication.1. Start a login
loginUrl and expiresAt
set:
Response
loginUrl and expiresAt as null. The user must finish authenticating by
expiresAt, 15 minutes after the request.
redirectUri must be registered on the client. Custom schemes are supported so an in-app
browser can dismiss itself back into your app.
2. Send the user to loginUrl
Open it in a browser, in-app browser or web view. The user authenticates with BankID on sajn’s
hosted page.
When they finish, we redirect to your redirectUri:
3. Read the result, from your server
Completed
sub and claims are null until status is COMPLETED. claims then has every claim key;
a claim your client isn’t approved for is null, as nin and nin_type are in the preceding
example for a client without the nin scope. The projection is the same one the OIDC
id_token uses.
In API version
2026-09, status is lowercase: pending, complete, failed, or expired, and method is BANKID_SE instead of SE_BANKID.
A completed result stays readable for 30 minutes, which is room for a retry or a brief outage
on your side. After that it is gone; the authentication itself is still recorded for billing.
A session that has run out without completing, or that belongs to another workspace, returns
404 NOT_FOUND, not 403: “exists but isn’t yours” is itself information. For every error
code, see Errors.
Handling the user who never comes back
The in-app browser case has a real failure mode: the user completes BankID, then closes the browser before the redirect fires. Your app never learns what happened. Two ways to cover it:Webhook
Subscribe to
login.completed. It fires whether or not the redirect arrives.Poll
GET the session until it leaves PENDING. Simple, and fine at low volume.Differences from OIDC
Reference
POST /api/v1/login/sessions
Full request and response schema
GET /api/v1/login/sessions/{id}
Full response schema

