Skip to Content
Login

Read the result of a sajn Login session

GET
/api/v1/login/sessions/{id}

Authoritative read of a login session. Call this from your server after the redirect.

claims and sub are populated only once status is COMPLETED, and contain exactly the fields your client is approved for — the same projection the OIDC id_token uses.

sub is stable per person per organization: the same individual logging into any of your clients always yields the same sub, and it can never be correlated with their identifier at another sajn customer.

Authorization

headerAuthorizationBearer <token>

API key, e.g. Authorization: Bearer sajn_svc_.... Not scope-limited: acts with its owner's workspace role.

Path Parameters

id*string

The sajn Login session ID.

Header Parameters

Sajn-Version?string

API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request.

Value in"2026-09""2026-10"
Sajn-Workspace?string

ID of the workspace this request acts in, from GET /api/v1/workspaces. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns 403 WORKSPACE_ACCESS_DENIED.

Response Body

200

application/json
  1. response
id*string

The sajn Login session ID.

status*string
Value in"PENDING""COMPLETED""FAILED""EXPIRED"
method*|

The eID the user authenticated with, such as SE_BANKID. Null until status is COMPLETED.

Value in"SE_BANKID""NO_BANKID_BIOMETRIC""NO_BANKID_HIGH""NO_QES""DK_MITID""DK_MITID_ERHVERV""FI_FTN""NL_IDIN""ZEALID_QES"null
completedAt*|
Formatdate-time
state*string|null
sub*string|null
claims*|

The claims your client is approved for. A claim it isn't approved for is null.

loginUrl*|

Open this in a browser or an in-app browser to authenticate the user. Set only in the response to the create request; null otherwise.

expiresAt*|

When the user must have authenticated by. Set only in the response to the create request; null otherwise.

Formatdate-time
Example Request
curl -X GET 'https://app.sajn.se/api/v1/login/sessions/cm4k2x9p10033abcd1234efgh'
Example Response
{  "id": "cm4k2x9p10033abcd1234efgh",  "status": "COMPLETED",  "method": "SE_BANKID",  "completedAt": "2026-09-29T07:41:00.000Z",  "state": "f9a1c2e3",  "sub": "sajn|7f3e1c92b4",  "claims": {    "sub": "sajn|7f3e1c92b4",    "amr": [      "SE_BANKID"    ],    "auth_time": 1790667660,    "name": "Kai Lindqvist",    "given_name": "Kai",    "family_name": "Lindqvist",    "birthdate": "1990-01-01",    "nin": "191212121212",    "nin_type": "SE_PERSONNUMMER"  },  "loginUrl": "https://login.sajn.se/l/cm4k2x9p10033abcd1234efgh/open",  "expiresAt": "2026-10-28T22:00:00.000Z"}

Was this page helpful?