# Parallel Developer Documentation **Legacy – v1.x**

This is documentation for Parallel Developer Documentation **Legacy – v1.x**, which is no longer actively maintained.

For up-to-date documentation, see the **[latest version](https://developer.parallelmarkets.com/docs/javascript)** (Current – v2.x).

## Overview

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](https://developer.parallelmarkets.com/docs/1.x/server), 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](https://github.com/parallel-markets/parallel-js/tree/master/examples/react-webpack) or our [Example ES Module Site](https://github.com/parallel-markets/parallel-js/tree/master/examples/webpack).

## 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](https://developer.parallelmarkets.com/docs/1.x/server/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](https://developer.parallelmarkets.com/docs/1.x/server/profile-api) 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.

### Parallel Backend

Your Site  w/ Parallel JS

Your site initializes Parallel JS SDK with appropriate config
User sees "Parallel Passport" button
JS SDK initiates OAuth2.0 flow
JS SDK renders embedded experience
User sees Parallel experience on your site
✔ KYC/Accreditation process complete
User
Visit Your Site
Click "Parallel Passport"
Begin OAuth with scopes & flow_type
Validate OAuth2.0 parameters

## 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](https://developer.parallelmarkets.com/docs/1.x/server/token-api#response-parameters) 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](https://demo.parallelmarkets.com/) 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](mailto: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](https://developer.parallelmarkets.com/docs/1.x/clients) 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](https://developer.parallelmarkets.com/docs/1.x/javascript/loading/react) 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](https://developer.parallelmarkets.com/docs/1.x/javascript/loading/vanilla) guide.
