• Developers
  • Sandbox api key

Dear community,

I'm working with the Bunq API for the first time. I would like to start my development using the Sandbox API. I've installed the tinker and used the API docs to guide me ( https://doc.bunq.com/# ).

In order to create an API context using bunq-install interactive script I need my Sandbox API key. The API Docs say:

When using the sandbox APK on my phone I get stuck during the registration of my user. When entering the phone number the app says a verification token is sent to my phone. A token never arrives.


I've looked for a Bunq support channel to assist me, but i'm unable to find one. Anyone has some advice on how to proceed :)?


Thanks!

    You can use this cUrl command to generate a Sandbox API-key:


    curl https://public-api.sandbox.bunq.com/v1/sandbox-user -X POST \ --header "Content-Type: application/json" \ --header "Cache-Control: none" \ --header "User-Agent: curl-request" \ --header "X-Bunq-Client-Request-Id: $(date)randomId" \ --header "X-Bunq-Language: nl_NL" \ --header "X-Bunq-Region: nl_NL" \ --header "X-Bunq-Geolocation: 0 0 0 0 000"


    It's also possible to use the Tinker script (https://www.bunq.com/developer), this also generates a sandbox key and shows the login credentials for the Android sandbox app.

      Hi Bastiaan,


      Thanks for your message. With the curl command I've managed to create a Sandbox API-key. However it would be nice to login to the sandbox app.


      - With the curl command I just get a API-key, no login credentials for the app.

      - When tinkering and making the 'tinker/user-overview.php' call I do get login credentials but these don't work.

      - When manually singing up a new account for the sandbox app I do not receive the verification code.


      I'm a bit stuck here, any help would be appreciated!

        You can find the support channel in Private Matters. In the app > Together > just below the colored buttons.

          You can use 992266 or 000000 as SMS verification code in the Android sandbox app.

          Then login with the e-mailaddress returned by the Tinker 'user-overview.php' script, and the code 000000.

            8 days later

            It didn't work until I changed in ApiContext.php : const BASE_URL_SANDBOX = 'https://sandbox.public.api.bunq.com/v1/';
            And commented out: //const BASE_URL_SANDBOX = 'https://public-api.sandbox.bunq.com/v1/';
            Yes, I use the old SDK since I didn't hack the new one yet to our needs, that means multiple users with keys in database.
            But I use the new SDK's Tinker in order to generate a Sandbox user.
            Two observations.
            1. Balance = 0, how to increase the balance?
            2. I don't get a callback like before, it's the same script on this test server. We stopped using the test server when Bunq pulled the old Sandbox environment. I just gave it a try today with Tinker...

              @Hieronymus-Olive-Akita#25243 Hi! You can increase the balance by sending a request to sugardaddy@bunq.com (max €500). Only working in the sandbox environment off course 😀😉

              Cheers!

                First off, I highly recommend upgrading your SDK. For example changes like the new sandbox URI like you changed manually will be missing or outdated.

                To get more balance send a request to sugardaddy@bunq.com for up to 500€

                Since they switched environments all old callbacks, sandbox users and other data was reset so I'm guessing you'll have to setup the callback again.

                  Dear Gregory, I tried to hack the new SDK in a fastly manner but failed. I need more time on this one.
                  I did set all NotificationFilters but to no avail.

                    PS Is the trick with sugardaddy somewhere mentioned? I studied doc.bunq.com many times and very thoroughly but this one didn't catched my eye.

                      @Hieronymus-Olive-Akita#25277 Click your profile icon and then click it again on your profile page. It's below your publicly visible name

                        a month later

                        @Bastiaan#18687 None of these Verification codes are working, and I never received any SMS either.

                          @Chenna-Blue-Lynx#32819 can you maybe try the code 123456 ?

                            Shameless self promotion here but bunqDesktop is great for creating sandbox accounts (which is a 1 button action) and debugging payments/requests.

                            Especially if you build the application yourself so you can run it in Dev mode and view the actual web requests and responses.

                            A few groups at the bunq hackathon were using it yesterday :)

                              Write a Reply...