Skip to main content

Login

The /login API is used to authenticate a user with BankID (FI).

Request:

To use the login API, the following request is sent to the API.

POST /v2/{api-key}/fi/login
{
"refID": "string reference",
"secretKey": "123456"
}
ParameterRequiredDescription
refIDNorefID is contextual data. It's used for identification on the client's side. Whatever string of data is entered here, will be availible in the verification response. See Verify.
secretKeyYesSecret key to be used for increased security. Provided by IDkollen on request.

Response:

IDkollen will respond with HTTP status 201 for successful request, or 4xx/5xx on errors. The loginLink that's returned in the response is then supplied to the end user to use for identifying him- or herself with.

HTTP/2.0 201 Created
{
"loginLink": "https://www.ident-preprod1.nets.eu/its/index.html?client_id=IDKCENRVOPSX&scope=openid+profile+ssn&response_type=code&redirect_uri=https%3A%2F%2Fdevapi.idkollen.se%2Fcallback%2Fdenmark%2Fapi&state=1&amr_values=mitid"
}
PropertyDescription
loginLinkloginLink is the link that the end user will use to identify him- or herself with.

Code redirect:

Once the end user has logged in, they will be redirected to the redirect URL provided to IDkollen by you, including a "code" parameter used to retrieve the data response from the identification, in the Verify step. If the parameter "refID" vas used in the request, it will also be included in the redirect.

https://your.redirect.url/?code=393b4e59-ec63-4760-86e0-1a9158bdd5fe&refID=YourRefID