Hi,
I am trying to do a get request to the monetary-account-bank endpoint, but it keeps returning 404 => the item your requested can not be found.
Steps I took before getting this error:
- get an installation token for my application
- register as a psd2 user
- register a device-server
- request a session-token
Then setting up oauth
- create oauth client
- register redirect_uri
- get client_id and client_secret
Then for a customer
- redirect to /auth endpoint to request access
- trade in the authorization_code for an access_token
- get new installation token for customer
- /device-server call with new installation token and customer access_token
- /session-server call with installation token of my app and access_token as { 'secret' => access_token }
So far, so good and the following is returned:
{
"Response": [
{
"Id": {
"id": 18523085
}
},
{
"Token": {
"id": 18523085,
"created": "2022-12-23 09:14:05.055679",
"updated": "2022-12-23 09:14:05.055679",
"token": "USERSESSIONTOKEN"
}
},
{
"UserApiKey": {
"id": 165980,
"created": "2022-12-23 09:14:00.845887",
"updated": "2022-12-23 09:14:00.845887",
"requested_by_user": {
"UserPaymentServiceProvider": {
"id": 165957,
"display_name": "somename PISP AISP",
"public_nick_name": null,
"avatar": {
"uuid": "78f93a9e-979d-400a-a398-c1826e600c3d",
"image": [
{
"attachment_public_uuid": "935aaaf4-518a-4a54-aca1-15c74d79c9a5",
"height": 1023,
"width": 1024,
"content_type": "image/png",
"urls": [
{
"type": null,
"url": null
}
]
}
],
"anchor_uuid": null,
"style": null
},
"session_timeout": 324000
}
},
"granted_by_user": {
"UserPerson": {
"id": 163119,
"display_name": "Lydia",
"public_nick_name": null,
"avatar": {
"uuid": "9debf55b-70b1-4d43-8d51-d6e7bd42fb5b",
"image": [
{
"attachment_public_uuid": "4b7e0d1d-9167-48ac-990a-70e342c87812",
"height": 126,
"width": 200,
"content_type": "image/jpeg",
"urls": [
{
"type": null,
"url": null
}
]
}
],
"anchor_uuid": null,
"style": null
},
"session_timeout": null
}
}
}
}
]
}
Then, I use the this response to get:
bunq_user_id = response['Response'][2]['UserApiKey']['id']
session_token = response ['Response'][1]['Token']['token']
And where I keep getting this error is when I try to make a call to /v1/user/bunq_user_id/monetary-account-bank
with a header: `'X-Bunq-Client-Authentication' => session_token.
I am missing something? I seem to be using the correct bunq_user_id from what I understand from the docs and other answers on this forum.