Authentication
The /auth
API is used to authenticate a user with BankID.
The pno
can be left out when authenticating from the device where BankID is installed.
In these cases the autoStartToken
parameter must be used when you start the BankID app.
See table below for information about each parameter.
POST https://api.idkollen.se/v2/{api-key}/auth
{
"pno": "191234567890",
"ipAddress": "8.8.8.8",
"callbackUrl": "https://partner.url/idkollen/response",
"refID": "12398698",
"secretKey": "123456"
"avsikt": "Intention text"
}
Parameter | Required | Description |
---|---|---|
pno | No | The personal number to authenticate. 12 characters, no - character. Can be left out when authenticating from the device where BankID is installed. |
ipAddress | Yes | The IP-address of the end user, or as close to the end user as possible. |
callbackUrl | No | The URL to where IDkollen will send the callback on successful or failed requests. Not required when using /collect to check status. The callbackUrl can also be set on account level for increased security. |
allowFingerprint | No | Allow user to authenticate with fingerprint or face recognition in BankID app. (Default value: true) |
refID | No | Reference ID which will be returned in the callback or collect. |
secretKey | Yes | Secret key to be used for increased security. Provided by IDkollen. |
enableQR | No | Set to true returns qrStartToken and qrStartSecret for animated QR-codes. |
intent | No | Text to be displayed in the users BankID app during authentication, for purposes of adding an intention for requesting the authentication. Max 1500 characters after base64. Formatting options can be found here: https://www.bankid.com/en/utvecklare/guider/formatera-text/syntax-specialtecken-atergivning |
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
{
"orderRef": "1668b9da-bff1-4dfc-ad48-60507b5a8d12",
"autoStartToken": "6e8fdb9e-4cc7-42a7-9ce7-59947aeec6e6"
}
Property | Description |
---|---|
orderRef | BankID reference number, can be used to collect response. |
autoStartToken | If pno is not included in the request, the BankID app must be started using this token. |