- Authentication
The following users can be used in our sandbox environment.
Username | Password | Name | Kennitala |
---|---|---|---|
jongunnars | pVvfBnvZ8X0rjOtC70 | Jón Gervimaður Gunnarsson | 0101809999 |
siggiolafs | yfkLlcAJZ0zcZKnSbw | Sigurður Gervimaður Ólafsson | 0201809999 |
gudeinars | zInKiTAAsrmUy28noM | Guðmundur Gervimaður Einarsson | 0301809999 |
gudgunnars | P2qEqqahHbRfc1ygXH | Guðrún Gervikona Gunnarsdóttir | 0401809999 |
annaeinars | oMKKMSrQKv03UXeTQh | Anna Gervikona Einarsdóttir | 0501809999 |
kristolafs | kwsdhUjJk2PU4mntY1 | Kristín Gervikona Ólafsdóttir | 0601809999 |
- Authentication
If you dont have your codeflow server up and running, this method can be used to generate access token for calling authenticated API.
1. Gather information
You will need the following information for your app .
client_id - This is your app "Consumer key" client_secret - This is your app "Secret key" redirect_uri - This is your app "OAuth redirect URL"
Since we are emulating the codeflow server - edit your app and set the OAuth redirect URL to: http://localhost/
2. Get authorization code
Generate authorization code open the following URL in your browser. Be sure to replace {consumer_key} with your app Consumer key.
https://authsandbox.landsbankinn.is/as/authorization.oauth2?client_id={consumer_key}&response_type=code&redirect_uri=http://localhost/&state=verifyMe&scope=profile+openid+customer+accounts+payments
Log in using one of our predefined sandbox users and grant the requested scopes. For this example your can use the following user.
User: jongunnars Password: pVvfBnvZ8X0rjOtC70
You will then be redirector to an URL on localhost. From the URL you will need to copy the authorization code found in the ?code= section.
http://localhost/?code=oZkLC20X1C9VYvt....TxuDWqrbepUNbF&state=verifyMe
3. Exchange oauth code for access token
Now exchange your authorization code for an access token.
curl -X POST https://authsandbox.landsbankinn.is/as/token.oauth2 \ -d 'grant_type=authorization_code' \ -d 'code={authorization code copied from URL}' \ -d 'redirect_uri=http://localhost/' \ -d 'client_id={consumer_key}' \ -d 'client_secret={consumer_secret}'
This will return your tokens.
{ "access_token": "eyJhbGciOiJSUz...UhVobA", "refresh_token": "Eui8cZiBuC44C...BSh6iR", "id_token": "eyJhbGciOiJSUzI1Nr...2luGMA", "token_type": "Bearer", "expires_in": 7199 }
4. Use your token
Now you can call authenticated API using the access token like this.
curl -X GET https://apisandbox.landsbankinn.is/Some/Authenticated/Service \ -H 'Accept: application/json' \ -H 'apikey: CxOAVlDYSyw1bIyYbbvCAKVG1zEKp14E' \ -H 'Authorization: Bearer eyJhbGciOiJSUz...UhVobA'
- General
If you have not found the answer to your question here, please mail it to us at fintech@landsbankinn.is and we will try to assist you.
- General
The only APIs available in this initial launch is open APIs. You don't need to authenticate, only use an API key. Simply put your API key in a header called "apikey" where the value is the actual API key.
- PSD2
No, not at this time. The initial launch of the API only includes open APIs.
- General
To get access to the production API, create an app using the app environment "Production". Where manual approval is required, your newly created app will get a pending status. A few days can pass before the app is approved.
- General
Before you start you need to register as a user:
- If you are already registerd, log in and start
- If you are not registerd, register and start
- General
The difference between the sandbox and production environments are:
- The sandbox environment is non-production data, static data or randomly generated data
- The production environment is real data
- General
To get access to the Landsbankinn Developer Portal and use the sandbox, you first need to get a developer account. You can create it a developer account on the registration page. Once you have submitted your registration, we will send you an email with an activation link. Activate your account by following the link and you are ready to go! Go to Get started for further instructions about the development of your application.
- General
- Technical Details
To switch from sandbox to production mode, you need to create another App and choose "Production" as selected API environment. We will review your application and let you know once your app has been approved. For additional questions, please contact us.
- General
- Errors and Bugs
For a bug report or feature request, please email fintech@landsbankinn.is
- General
- Technical Details
For sandbox use apisandbox.landsbankinn.is. For production use openapi.landsbankinn.is.