snijder / bunq-api-client
Bunq API Client
Installs: 33
Dependents: 0
Suggesters: 0
Security: 0
Stars: 10
Watchers: 8
Forks: 4
Open Issues: 4
pkg:composer/snijder/bunq-api-client
Requires
- guzzlehttp/guzzle: ~5.0
- ramsey/uuid: ^3.5
Requires (Dev)
- phpunit/phpunit: ^6.0
This package is not auto-updated.
Last update: 2025-10-04 01:09:33 UTC
README
Description
A PHP Client Library for accessing Bunq's API.
Installation
$ composer require snijder/bunq-api-client
Usage
$keyPair = new \Snijder\Bunq\Model\KeyPair($apiKey, $publicKey, $privateKey); $bunqClient = new \Snijder\Bunq\BunqClient($keyPair); $userResource = new \Snijder\Bunq\Resource\UserResource($BunqClient); $userResource->listUsers(); //list all available users.
Token Storage
This Bunq API client automatically handles the installation by itself. By default the tokens are being store in the "PHP temporary folder".
You can use the TokenStorageInterface
to overwrite the default file system storage.
$bunqClient->setInstallationTokenStorage($myInstallationTokenStorage); $bunqClient->setSessionTokenStorage($mySessionTokenStorage);
or use the default token file storage.
$bunqClient->setSessionTokenStorage( new \Snijder\Bunq\Storage\SessionTokenFileStorage($path) ); $bunqClient->setInstallationTokenStorage( new \Snijder\Bunq\Storage\InstallationTokenFileStorage($path) );