Hi all,
I'm making my own little program in Golang to talk to the bunq API. I have RSA key generation and request signing working, and now I'm ready to POST to /v1/installation to get the server public key and installation token. However, the response from that endpoint is not what is documented. According to the documentation, I should get one object with 'Id', 'Token' and 'ServerPublicKey' objects, like this:
{
"Id": {
"id": 0
},
"Token": {
"id": 0,
"created": "string",
"updated": "string",
"token": "string"
},
"ServerPublicKey": {
"server_public_key": "string"
}
}
However, I get a response like this, with three separate objects:
{
"Response": [
{
"Id": {
"id": 192906
}
},
{
"Token": {
"id": 1661917,
"created": "2019-05-05 15:01:18.181971",
"updated": "2019-05-05 15:01:18.181971",
"token": "94149cfddd7b09227254b9d8eda16132df0aae27703c971dcddd8f76481d48a8"
}
},
{
"ServerPublicKey": {
"server_public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA24zlyjmj5p3gGFdn0cU8\n0kpB1jkCzfZIpl78wOJv8+2OqjE3M50wKCVdNS+zm59LVOn1jLAYLSr3nBpAwH9R\nlHcpCyAfBVLRd3PdGGwTo\/x0Ul7S8buzHRa1pyqmCQL6uNImhpl8xCyegR9ozQmE\nXxi\/f7lTY6TnuhvsZIr8B6MsDgUpUgwWAVYLxZtKol7BRCVdc0ZZc6vPnZUUGxN2\nlHDF9R36S4rNz8A4654h726b0kmaFBayNZGX4CSSCbaq6cFkpl5FLk6tQJcrZN1m\nqKzPlXAGs03S5YS758rDlVV4FNYwibEai4cZMyM5SENYsjC3RRrfUyGyin8xRVeT\nmwIDAQAB\n-----END PUBLIC KEY-----\n"
}
}
]
}
Can anyone help me to understand this? Is this a technical mistake on my part, a misunderstanding of the documentation, or is this really (as I perceive it now) a bug in the bunq API (or documentation)?
Thanks for any insights,
Sybren