¬†  

PHP SDK. Api key koppelen lukt niet / API key does not connect

Tim shared this question 1 week ago
Question

Ik probeer met de PHP SDK een api key te koppelen, maar zowel als met het install script als handmatig krijg ik

User credentials are incorrect. Incorrect API key or IP address.
terug.


Api key heb ik een IP wildcard op staan en heb zowel getest op een lokale server als op de production server.


Gaat om de sandbox omgeving

Comments (6)

photo
2

Hi Tim 👋

Could you let us know how you obtained the key? Did you get it through the app, via tinker or from a friend?

Then we can be sure to help you the best way possible 👍

Thanks!

photo
3

The app. Production works fine by the way

photo
3

The best way to get a sandbox API-key is via the Tinker script (the API-key is placed in bunq-sandbox.conf) .

New sandbox API-keys begin with "sandbox_".

photo
5

I setup this command as an alias so I can quickly generate sandbox keys. Should work fine if you have curl installed in your command line tool

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"

photo
3

That's also a nice method Gregory👍

photo
photo
4

Stupid me. I was using the production key for the sandbox