Skip to main content

Authentication

The POST /v3/mitid/auth endpoint is used to start an authentication using MitID.

POST /v3/mitid/auth
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
{
"referenceText": "woop",
"refId": "12398698"
}
ParameterRequiredDescription
referenceTextNoText shown to the end user in their phone or computer during authentication. The maximum length of the message is 130 characters in total but Identisure reserves 50 characters so the available count for customers is 70. Due to limitations from MitID, the referenceText value cannot be displayed during testing of this feature in our staging environment, but will be visible in the app during use in the production environment.
refIdNoReference ID which will be included in a Collect and in the redirect.

Response:

IDkollen will respond with HTTP status 201 for successful request, or 4xx/5xx on errors. For more information about errors, please see the Errors section.

HTTP/2.0 201 Created
{
"id": "1668b9da-bff1-4dfc-ad48-60507b5a8d12",
"refId": "12398698",
"status": "PENDING",
"url": "https://..."
}
PropertyDescription
idAuthentication id, used to cancel or get the status of this authentication request.
refIdThe refId given in the request, if any.
urlThe URL where the end user can identify themselves.

Code redirect:

Once the end user has authenticated, they will be redirected to the redirect URL provided to IDkollen by you, including the very same "id" as a request parameter that can be used in the Collect step. If the parameter "refId" was used in the request, it will also be included as a request parameter.

https://your.redirect.url/?id=1668b9da-bff1-4dfc-ad48-60507b5a8d12&refId=12398698