dnb 1.2.0+1
dnb: ^1.2.0+1 copied to clipboard
A platform-agnostic Dart client library for interacting with DNB's Open Banking APIs.
example/main.dart
import 'package:dnb/dnb.dart' as dnb;
void main() async {
final openBankingClient = dnb.OpenBankingClient(
clientId: 'YOUR-CLIENT-KEY',
clientSecret: 'YOUR-CLIENT-SECRET',
apiKey: 'YOUR-API-KEY',
);
/// Retrieve all test customers from sandbox
final testCustomers = await openBankingClient.getTestCustomers();
print(testCustomers);
/// Retrieve token for access to other APIs
final token = await openBankingClient.getToken(testCustomers.first);
print(token);
/// Retrieve the current customer using the token
final customer = await openBankingClient.getCurrentCustomer();
print(customer);
}