GrandId API / BankId v3
 1.0.1-oas3 
OAS3

Documentation of the FederatedLogin method in GrandID API for BankId.

Servers

General

POST/FederatedLogin
Initializes a new session in GrandID for the BankId Service

Used to set initial parameters and retrieve a session from GrandID

Parameters

Name Description
apiKey  *
( query )
authenticateServiceKey  *
( query )

Request body

callbackUrl
string
The url to return the user to. Should be base64 encoded for best results.
personalNumber
string
The users 12 digit personal number without and spaces, dashes or extra characters. Will be validated by checksum before proceeding.
userVisibleData
string
If set signing is enabled if available instead of authentication.
userNonVisibleData
string
If not set, the value in userVisibleData is copied.
mobileBankId
boolean
If set to true, only mobile certificates will be allowed to be used (mobile apps).
thisDevice
boolean
Try to launch bankid automatically on the device the user is using. This can interfer with setting "mobileBankId".
deviceChoice
boolean
Present the user with a menu choice between "this device" and "other device" (this corresponds to setting "thisDevice" to true of false).
askForSSN
boolean
Ask the user for a SSN. personalNumber overrides this, but is required when "thisDevice" is false.
gui
boolean
When set to false instead of a redirectUrl, returns "autoStartToken" which is used to (possibly) start BankId yourself. When an SSN is passed, no special launching except informing the user about starting bankid is required.
customerURL
string
If wanted, this parameter can be set to a URL that will be shown as the "backwards" link on all screens. Needs to be base64 encoded.

Responses

Code Description
200

A initialized session (sessionObject) or a error (errorObject).

Controls Accept header.
POST/GetSession
Retrieves user attributes from a session

After a user has completed the authentication and SP has recieved a callback at their callbackUrl, call GetSession to get the attributes of the users session.

Parameters

Name Description
apiKey  *
string
( query )

Customer key

authenticateServiceKey  *
string
( query )

Service key

sessionid  *
string
( query )

The sessions id, which is returned to SP via callbackUrl or kept in memory by the SP from FederatedLogin.

Responses

Code Description
200

A completed session (sessionDataObject) or a error (errorObject).

Controls Accept header.

Models

errorObject{
code string
message string
}
sessionObject{
sessionId string
example : 123123
redirectUrl string
example : https://login-test.grandid.com/?sessionid=123123
}
GetSessionObject{
sessionId string
example : 123123
redirectUrl string
example : https://login-test.grandid.com/?sessionid=123123
}
BankIdRequest{
description:

None of these parameters are required and will be set to resonable defaults if not passed along.

callbackUrl string
example : https://customers.com

The url to return the user to. Should be base64 encoded for best results.

personalNumber string
example : 197902069272

The users 12 digit personal number without and spaces, dashes or extra characters. Will be validated by checksum before proceeding.

userVisibleData string
example : A base64 encoded string to show the user when signing.

If set signing is enabled if available instead of authentication.

userNonVisibleData string
example : The base64 encoded string to actually sign in the background.

If not set, the value in userVisibleData is copied.

mobileBankId boolean
example : false

default : false

If set to true, only mobile certificates will be allowed to be used (mobile apps).

thisDevice boolean
default : true

example : true

Try to launch bankid automatically on the device the user is using. This can interfer with setting "mobileBankId".

deviceChoice boolean
default : false

example : false

Present the user with a menu choice between "this device" and "other device" (this corresponds to setting "thisDevice" to true of false).

askForSSN boolean
default : false

example : false

Ask the user for a SSN. personalNumber overrides this, but is required when "thisDevice" is false.

gui boolean
default : true

example : true

When set to false instead of a redirectUrl, returns "autoStartToken" which is used to (possibly) start BankId yourself. When an SSN is passed, no special launching except informing the user about starting bankid is required.

customerURL string
default : false

example : https://customer.com

If wanted, this parameter can be set to a URL that will be shown as the "backwards" link on all screens. Needs to be base64 encoded.

}