1. Go to this page and download the library: Download bantunes/bridgeapi-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bantunes / bridgeapi-sdk example snippets
ntervalle\BridgeSDK\BridgeConfig;
use Intervalle\BridgeSDK\BridgeClient;
// Initialisation de la configuration
$config = new BridgeConfig(
getenv('BRIDGE_CLIENT_ID'),
getenv('BRIDGE_CLIENT_SECRET'),
getenv('BRIDGE_API_VERSION')
);
// Création du client
$client = new BridgeClient($config);
// Créer un nouvel utilisateur
$userUuid = $client->users()->createUser('user-001');
echo "UUID de l'utilisateur : $userUuid";
// Authentifier l'utilisateur et obtenir un token
$userToken = $client->auth()->getUserToken($userUuid);
echo "Token utilisateur : $userToken";
// Créer une session pour connecter un compte bancaire
$connectUrl = $client->connectSession()->createSession($userToken, '[email protected]');
echo "Lien de connexion : $connectUrl";