Getting started

List accounts

This guide show how to list accounts for a user. It assumes that you have previously created a Consent that the user has authorised. See the Create Consent guide on how to implement this.

Variables and constants used in the guide

NameDescription
accessTokenAn access token with scope "accountinformation private".
bicThe BIC code for the bank.
consentIDThe id of the Consent.
psuUserAgentThe User-Agent from the user's request.
psuIpAddressThe user's IP address
xRequestIDMost requests require the header X-Request-ID, which is a uuid. This will be a unique identifier of your request and will be useful in case you need support. Make sure to create a new GUID for every individual request. In this guide, we assume that you store this value in the variable xRequestID.

Endpoint

GET /psd2/accountinformation/v1/accounts
javascript

Request headers

Accept: "application/json",
Authorization: "Bearer " + accessToken,
Consent-ID: consentID,
Content-Type: "application/json",
X-BicFi: bic,
X-Request-ID: xRequestID,
PSU-IP-Address: psuIpAddress,
javascript

Result

accounts = response.body.accounts
javascript