• Developers Ask the Community
  • How can I create API key for production environment through SDK?

@Made4China-Service-B-V#94104 updating the status of the request is not possible for those that can not make payments from the account. (hence I asked what type of Connect you're using). It might be that you're trying to use Limited Connect, which does not allow to make payments as far as I know.

    @Made4China-Service-B-V#94080 Heb je die collega toegang gegeven via bunq of niet?

    Want wellicht begrijp ik het verkeerd, maar het klinkt namelijk heel erg alsof je zelf een app wil maken die je collega's kunnen gebruiken om betalingen voor jou te doen zonder dat ze zelf een bunq account hebben met toegang tot jouw rekening. Met andere woorden een app om op alternatieve wijze toegang tot jouw rekening te geven.

      @Made4China-Service-B-V#94125 Now our app allows the authorized user to manage the accounts and to make online payments but no scanning(QR code). When we try to pay by scanning, it always returns a warning saying “insufficient authorization”. What’s the reason raising this bug? How to fix it?

        @Sander#93826 Volgens mij zegt bunq zelf altijd dat de app gemaakt is op de API en in theorie moet het volgens mij best kunnen.

        Waarschijnlijk moet je aan de hand van de QR eerst informatie opvragen bij bunq (bedrag, omschrijving en dergelijke) en dan kan je daarna bevestigen met het rekeningnummer waar het geld van afgeschreven kan worden.

        Ik zou niet weten waarom dat per se via de bunq app zou moeten gaan. Maar ik ken de API van bunq niet goed genoeg om te zeggen welke endpoints je dan moet gebruiken.

          @Made4China-Service-B-V#94126 You can automatically create a payment request in the bunq app based on the token in the iDEAL QR-code, via the token-qr-request-ideal endpoint. After this you can reject or approve this request via the request-response endpoint.

            @JeroenE#94139 Dat kan ook prima. Mits de API gebruikt wordt zoals hij bedoeld is. Als iemand met limited connect een api key genereert dan heeft die api key ook limited mogelijkheden op dat account. Als ik in de App geen rechten heb om een betaling te autoriseren dan in de API ook niet uiteraard. Vandaar dat ik al enige posts probeer uit te zoeken wat de context van het probleem is, maar so far is het mij nog niet echt duidelijk wat de huidige opzet nu is. Het klinkt mij in de oren als een verkeerd account dat de handelingen uitvoert, maar dat is puur giswerk vanaf mijn kant van het internet. 😅

              @Made4China-Service-B-V#94126 You receive this error when, for example, the request header "X-Bunq-Client-Authentication" is missing or containing an invalid value (wrong token).

                @Sander#94265 Zoals ik het begrijp is er helemaal niemand met een API key behalve de eigenaar zelf. Die is nu bezig een app te maken om zijn rekening(en) te laten beheren door anderen.
                Wellicht omdat je via de API key van bunq alleen read-only of volledige toegang tot alles kan geven. En niet alleen toestemming voor rekening X of tot maximaal bedrag Y etc.

                Wat natuurlijk op zich ook niet uitsluit dat hij zelf een verkeerde API key zou hebben. Maar omdat hij aangeeft dat gewone betalingen wel lukken neem ik even aan dat hij toch al gebruik maakt van een API key met volledige toegang.

                  @Bastiaan#94268
                  I seem to understand, but where is the "X-Bunq-Client-Authentication" obtained from "BunqContext"? I tried to install tokens, session tokens, and there will be 401 or 403 errors.

                    @Made4China-Service-B-V#94549 See doc.bunq.com (section about Headers) for a description of all required headers and what data you should supply. 🙂

                      @Bastiaan#94578

                      @Sander#94573
                      Ja, ik gebruik sdk-java maar ik gebruik "BunqContext.getApiContext ().GetInstallationContext().GetToken()" of "BunqContext().getApiContext () .GetSessionToken()" naar "X-Bunq-Client-Authentication als" waarde, niet correct. Het verzoek van "the request ondertekening is Invalid"

                        @Made4China-Service-B-V#94591
                        Can you maybe try the following, this wil get the Description of the first bankaccount (in the accountDescription string):

                        import com.bunq.sdk.context.ApiContext;
                        import com.bunq.sdk.context.ApiEnvironmentType;
                        import com.bunq.sdk.context.BunqContext;
                        import com.bunq.sdk.model.generated.endpoint.MonetaryAccount;
                        import com.bunq.sdk.model.generated.endpoint.MonetaryAccountBank;
                        
                        ApiContext apiContext = ApiContext.create(ApiEnvironmentType.SANDBOX, "YOUR_API_KEY", "TestClient");
                        apiContext.save("/path/to/bunq.conf");
                        apiContext.ensureSessionActive();
                        BunqContext.loadApiContext(apiContext);
                        
                        List<MonetaryAccount> monetaryAccountList = MonetaryAccount.list().getValue();
                        MonetaryAccountBank monetaryAccount = monetaryAccountList.get(0).getMonetaryAccountBank();
                        String accountDescription = monetaryAccount.getDescription();

                        Does this work ?

                          @Bastiaan#94593

                          Ik wil toegang tot de "/user/{userID}/token-qr-request-ideal". In de X-Bunq-Client-Authentication verzoeken, maar ik probeer dat niet kan op twee manieren, dat "het verzoek ondertekening is ongeldig."
                          Thanks

                            @Made4China-Service-B-V#94594 I know, but i first wanted to start simple 😉. With a simple script, to check if you can get some data from the bunq API.

                              @Bastiaan#94597
                              Voor, die je me stuurde, het scheppen van een kader deel ik het al gedaan, en ik probeer dat twee penningen zijn waarde hebben, is dat het verzoek ondertekening is ongeldig.

                              Yes, I've done the context creation part, but neither of the two tokens obtained from "BunqContext" can be used in "X-Bunq-Client-Authentication", which prompts The request signature is invalid.

                                @Made4China-Service-B-V#94599 Hi Made4China Service,

                                We're trying to help you step-by-step, it would be very useful if you would try the steps as proposed such that we can help you pinpoint the problem hopefully. Can you just ensure that the snippet made by Bastiaan runs? Then we know that it is not some weird local thing.

                                Or can you maybe share some of the code (without API keys or other sensitive data obviously) such that we can take a look? Your last messages seem translated automatically; it's not really helping I'm afraid, hence I will stick to English. We need to know what steps you've already tried. 🙂 From the "Dutch" error message I get the impression that this might also be a problem with the signing process of the request.

                                  @Sander#94602 @Sander#94602

                                  Yes, I make sure that the context creation part works. I request'/ user/{userID}/ token-qr-request-ideal'by returning information to get the content of the two-dimensional code, but prompt'The request signature is invalid'.
                                  When requesting the bunq interface, token tries two values returned in the method, but neither of them works.

                                    @Made4China-Service-B-V#94605 ah, that's actually helpful. So we are talking about the signature of the request. That means that the data is not being signed correctly. I assume you use the signing logics from the SDK and not your own? Is the value of X-Bunq-Client-Signature set in your requests?