Skip to main content

Get Started

This guide will explain how to get API keys and start testing with Vezgo’s pre-built Connect Flow. Follow the steps below to get started.

Sign-up for API Keys

Go to Vezgo’s Portal and create an account.

Unable to load image

Following these steps will automatically create your app, and take you to your portal. You now have access to your unique Client ID and Client Secret. Important: Your Client Secret is only available at this time. Please make a note of it and keep it in a safe place.

Unable to load image

The free version of the API includes accounts and balances. For access to transactions, webhooks and other features, you can activate a free 30-day trial by clicking on Get Full Access. See our Pricing page for more details.

Unable to load image

Quickstart example

The best way to get started with Vezgo API is via the Vezgo JS SDKs (Frontend and Backend). You can take a look at the Vezgo Example project or follow the steps below:

1. Import the SDK

You can import the distribution build directly in your webpage:

<!-- Import the specific version -->
<script src="https://unpkg.com/vezgo-sdk-js@1.0.3/dist/vezgo.js"></script>

<!-- Or import the latest version (may contain breaking changes) -->

<script src="https://unpkg.com/vezgo-sdk-js/dist/vezgo.js"></script>

Or install and import it in a JS build system / NodeJS.

The same package is used for both frontend (web, mobile or desktop app) and backend (NodeJS).

npm install --save vezgo-sdk-js
// commonjs
const Vezgo = require('vezgo-sdk-js');

// esX
import Vezgo from 'vezgo-sdk-js';

// React Native
import Vezgo from 'vezgo-sdk-js/dist/vezgo.es5';

2. Initialize the vezgo instance

A vezgo instance is initialized using your Client ID and Client Secret in the backend, or only Client ID in the frontend.

Backend
const vezgo = Vezgo.init({
clientId: 'YOUR_CLIENT_ID',
secret: 'YOUR_CLIENT_SECRET',
});
Frontend
const vezgo = Vezgo.init({
clientId: 'YOUR_CLIENT_ID',
// optional parameters for authenticating the vezgo frontend instance with your server.
// See Authentication section for a more detailed explanation.
authEndpoint: '/vezgo/auth', // default value, need to accept POST
auth: {
params: { userId: 'LOGGED_IN_USER_ID' }, // custom params for authEndpoint
headers: {}, // custom headers for authEndpoint
},
});

Log in a user to create a user instance if you want to request user data.

Backend
const user = vezgo.login('USERNAME');
Frontend
// No need to pass username because it's assumed that the `authEndpoint`
// implementation on your backend server should already know that from
// your authenticated user.
const user = vezgo.login();

3. Connect a user, or request for data.

Start the Connect process for users to connect their institutions, or call the SDK helper methods to request data.

Backend
// Get general Vezgo data
const providers = await vezgo.providers.getList();

// Get user data via the `user` instance
const account = await user.accounts.getOne('ACCOUNT_ID');
Frontend
// Get general Vezgo data
const providers = await vezgo.providers.getList();

// Start the Connect process when user clicks the Connect button
document.getElementById('#connect').addEventListener('click', () => {
user.connect().onConnection(async accountId => {
const account = await user.accounts.getOne(accountId);
displayAccount(account);
});
}, false);