The Collection you have isn’t really in the right order, to be honest, as you would need a token first, to authenticate yourself against the other endpoints of the API.
From the Quickstart guide:
The first thing you do is make a POST request to the https://ob.nordigen.com/api/v2/token/new/
with the secret values that you have most likely got from creating an account with that service.
First, you’ll need to get your user secret from Nordigen’s Open Banking Portal in section User Secrets. Use those secrets to create an access token (referenced as ACCESS_TOKEN in the following steps).
The response of this is going to be the token information that you will use to make a request to a different endpoint.
{
"access": "someSecretValue",
"access_expires": 86400,
"refresh": "someRefreshSecretValue",
"refresh_expires": 2592000
}
In this example from the Quickstart guide, the ACCESS_TOKEN
value, is the same value as the token
value from the response of the first request. This has an expiry time (I think it’s 24 Hours) so once that’s run out, you will need to request a fresh token and reset the clock.
There are different methods of automatically extracting the response values into a variable and using that in the headers, I would initially get this working by hardcoding the values first and then refactoring what you have.
Once you’re ready, you can get the token by adding this to the Tests
section of the token request:
pm.globals.set('token', pm.resonse.json().token);
You will then be able to use the variable syntax to replace the header values: