Personlig klient

With "Personlig klient" you can get access to your personal data by using our open APIs. To get access you need to have BankID and a customer relationship with one of the SpareBank 1 banks. Data available is your own accounts with transactions. You will also be able to transfer money between your personal accounts. The APIs available to perform those actions are the Account API and the PM Transfer API.

Getting started

1. Register Personlig klient

  • Start by logging into the bank where you have your customer relationship by clicking one of the links in the list of available banks below. You will be redirected to personlig klient after Login.
  • When the application is registered, you will be issued with your applications credentials for production: a client id and client secret. Save those for later.
  • Note: Remember that your application credentials are personal, do not share those with others.
 

2. Authenticate and authorise

Authenticate using BankID and authorize your application to access the SpareBank 1 API on your behalf by following the steps below

  • Modify the following link with your redirect_uri and credentials, then open it in a browser: authorize
    • finInst is your bank's identifier and this parameter is optional (This will be set after you choose bank, but you can also include it in the link to begin with. See available banks in the list below)
    • client_id is the value issued to your application
    • state is any client-defined value
    • redirect_uri is where the client is redirected after authentication; Must match a pre-configured redirect URI for your registered application
    • response_type must be "code"
  • Choose your bank, and after successful authentication and authorization, the browser redirects to your specified redirect_uri with an extra parameter called code.
  • Extract the authentication code from the code parameter in the url

 

3. Issue an Oauth-Token

Pass your application's credentials, along with the end-user's authentication code (extracted from the previous step), to SpareBank 1 to be issued an oauth token. An oauth token enables you to complete actions on behalf of, and with the approval of, the end-user (in this case you).

curl --location --request POST 'https://api.sparebank1.no/oauth/token' \ 
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=123e8276-af11-4a4h-989e-9e80395b7ua8' \
--data-urlencode 'client_secret=e72e5084-9b23-4399-acb5-6f6f56687634' \
--data-urlencode 'code=uHvH2e4NrrGyIFspCig28LWHGeSmo1' \
--data-urlencode 'grant_type=authorization_code' \
--data-urlencode 'state=3586713' \
--data-urlencode 'redirect_uri=http://thisisyou.com'
  • Extract the oauth token (access_token) from the response and save it. This OAuth token authorizes your access to the available API endpoints, and is valid for six months.
  • Note: Remember that your oauth token is the key to the APIs and can be misused if shared with others.
 

4. Invoke an API

  •  Use the OAuth token to access any SpareBank 1 API endpoint your application has access to. In this case, the accounts API or the transfer API:

    Example:
curl https://api.sparebank1.no/open/personal/banking/accounts/all --header "Authorization:Bearer 9VKwFeoS8QfeQEeFxD5MiOf6YlFQR0nOpLF1ZUrHRrWqp3rY7G13hy"
  • For information on how to transfer money, please see the documentation in the developer portal: PM Transfer

 

 

Bank finInst
Sparebank 1 Østlandet fid-ostlandet
Sparebank 1 Nord-Norge fid-nord-norge
Sparebank 1 SR-bank ASA fid-sr-bank
Sparebank 1 SMN fid-smn
Sparebank 1 Telemark fid-telemark
Sparebank 1 Hallingdal Valdres fid-hallingdal-valdres
Sparebank 1 Lom og Skjåk fid-lom-skjaak
Sparebank 1 Gudbrandsdalen fid-gudbrandsdal
Sparebank 1 Nordvest  fid-nordvest
Sparebank 1 Modum fid-modum
Sparebank 1 BV fid-bv
Sparebank 1 Ringerike Hadeland fid-ringerike-hadeland
Sparebank 1 Søre Sunnmøre fid-sore-sunnmore
Sparebank 1 Østfold Akershus fid-ostfold-akershus