Creating a sandbox user and getting an API key
An API key is a unique identifier that grants access to our services and is linked to a specific user account. Think of it like a key to your bank account—keep it secure to prevent unauthorized access to your data and transactions.
For development and testing, we offer sandbox users, which simulate real accounts, including balances, cards, and payment capabilities. This allows you to test and integrate your system safely without impacting live data. You can find more details on how to create and use a sandbox user here.
DO NOT commit your API key into your source control provider (Github/Gitlab/etc).
If you end up doing so you can always revoke the key from your bunq app, or generate a new user here.
Create a sandbox user
To create a user and obtain an API key you can just run 1 command from your terminal:
Run this command to obtain a user person. It will return just a API key, but in the background we generated a dummy user for you to play around with in the sandbox.
Run this command to obtain a business user
This request will create a new user in the system. The response will give you the API key that belongs to this user. Store it somewhere safe.
Code samples
Creating a user-person:
Creating a user-company:
What's next
We can almost start making calls with this API key we now have. However because of PSD2 and security reasons we first will need to register a Installation and device. Once we have those we will get a session and our user details.
Last updated
Was this helpful?