Skip to main content
Version: Legacy – v1.x

JavaScript SDK

The Parallel Javascript Software Development Kit (SDK) helps partners quickly and easily integrate the Parallel Markets API into an existing website frontend. You can use Javascript to authenticate users and request permission to access information about users (for instance, accreditation status). The same basic OAuth 2.0 process is followed as the server API uses, but it takes place entirely in the browser.

You do not need to make any server (aka, "backend") changes to take advantage of the Javascript SDK integration. However, if you'd like the ability to make ongoing requests from a server context to the Parallel APIs, you may want to create custom code that will send resulting auth tokens from your frontend environment to your server.

Three Minute Setup

If you're looking for the fastest way to test things out, check out our Example React App or our Example ES Module Site.

High Level Overview

Once you've incorporated our JavaScript SDK into your website:

  1. Your site will describe the flow(s) a user is about to go through, and then show a button the user can click to initiate a Parallel flow.
  2. When the user clicks the button, a Parallel flow will be started (generally via an interstitial overlay on your site in an iframe, our overlay flow type). You'll indicate the information you need (KYC/Identity, Accreditation, Blockchain, etc) via a list of scopes and the flow type (overlay, embedded, redirect) you'd like. Note: the flow type will always be "redirect" on mobile and smaller screens.
  3. The user will provide any information / documents necessary to satisfy the scopes you requested (for themselves or a business they select), and they will then be returned to your site.
  4. You'll then have access to tokens that will allow you to immediately make requests against any one of our API's via JavaScript on your site.
  5. If you'd like to make ongoing requests from your backend, you can send the resulting auth tokens to your backend. One of the tokens is a "refresh token" that will allow you to keep your tokens up to date over time so you can make calls from your backend in an ongoing way.
Authentication Tokens

If you're using the JS SDK, you do not need to worry about calling any APIs to fetch authentication tokens. The entire process for securely retrieving the OAuth access_token and refresh_token payload is entirely handled for you automatically (for all three of the flow_types whether you're using the default overlay, embed or redirect option).

Prerequisites

Before you can use the JavaScript SDK, you'll first need to:

  1. Make sure you have access to your company's account on our demo site for testing. These accounts are generally set up when your company is onboarded, but if you need a new account please reach out to ids-partner-integrations@icapital.com.
  2. Set up an OAuth Client in your company's settings on our demo site. You can find instructions in the OAuth Client Configuration section. You'll need the client_id as a result of this step.

Once you've set up your OAuth Client, you're ready to start using the SDK.

Getting Started

If you use React, the next step is to check out our React Integration guide.

Otherwise, if you'd like to load our SDK as an ES module or directly via a <script> tag, see our JavaScript ES Module guide.