This quickstart guide is designed to help you build a quick integration with LinkMoney from scratch. While following this guide, you will:

  1. Authenticate with the Link Money API
  2. Open our portal and link a financial account.
  3. Retrieve transaction and account data from the API.

Before starting the Link Money Quickstart guide, sign up for a FinGoal developer account. The FinGoal developer portal walks you through the onboarding process and issues your application credentials. You will use these credentials in the following steps.

Step 1: Generate a User-Specific Access Token.


The very first step to integrate with Link Money is to generate an access token. Link Money uses Client Credentials Oauth2 to create a JWT (JSON web tokens). The JWT tells Link Money who you are, and whose data you want to access.

<aside> ℹ️ For a deeper dive on authentication and authorization in Link Money, see Authentication.

</aside>

While Link Money has several different kinds of tokens (corresponding to different levels of access), we must first focus on creating a user-level access token. This token lets us access Link Money on the behalf of a single end-user.

The following code snippet demonstrates how to retrieve a Link Money access token with Node.js. By requesting a token that’s specific to a user (one which has a user ID field in its request data), you can authorize the LinkMoney Web Gateway on behalf of a user.

The important fields to keep in mind for the generate token call are:

  1. Your client_id, which is issued in the Link Money developer portal.
  2. Your client_secret, which is issued in the Link Money developer portal.
  3. Your organization, which depends on your environment. If you are developing on behalf of a larger organization, ask the broad organization for the organization ID they have registered with Link Money.
  4. Your userId, which can be any string you want. In this flow, you do not necessarily need to create the user before creating their authentication token - use this token with the portal, and Link Money will do the rest.
const axios = require("axios");

const createLinkMoneyToken = async (options) => {
  try {
    const { userId, itemId } = options;
    const data = {
      client_id: '{YOUR_CLIENT_ID}',
      client_secret: '{YOUR_CLIENT_SECRET}',
      audience: '<https://link-money-api/>',
      grant_type: 'client_credentials',
      organization: '{YOUR_ORGANIZATION_ID}',
    };

		// use a userId string if you require a user token.
    if (userId) {
      data.userId = userId;
    
		// use an item_id string if you require an item token. 
    } else if (itemId) {
      data.item_id = itemId; 
    }
    
    const config = {
      method: 'post',
      url: '<https://dev-jhhgu9vc.auth0.com/oauth/token>',
      headers: {
        'Content-Type': 'application/json',
      },
      data: data,
    }

    const createTokenResponse = await axios(config);
    const { data: tokenData } = createTokenResponse;
		const { access_token } = tokenData;
  } catch (error) {
    // any http errors will be surfaced here. 
  }
}

Step 2: Open the Portal


With a successfully generated user-specific access token, you have what you need to authorize a call to the Link Money Gateway, where your users can link their third party financial accounts for aggregation and verification.

The gateway can be invoked in several ways: