# 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/configuration)** (Current – v2.x).

Version: Legacy – v1.x

The Parallel SDK must be initialized with, at minimum, a `client_id` before any other functions are called.

## Available Modules
- React Module
- ES Module
- Manual Loading

## Initializing the SDK

```js
import { loadParallel } from '@parallelmarkets/vanilla'

const parallel = loadParallel({ client_id: '123', environment: 'demo', flow_type: 'overlay' })
```

```js
import { loadParallel } from '@parallelmarkets/vanilla'

// wait for the loading to finish before calling any functions

const parallel = await loadParallel({ client_id: '123', environment: 'demo', flow_type: 'overlay' })

parallel.getLoginStatus(console.log)
```

```html
<script src="https://app.parallelmarkets.com/sdk/v1/parallel.js"></script>

<script>
  Parallel.init({ client_id: '123', environment: 'demo', flow_type: 'overlay' })
</script>
```

## Optional Fields

There are a number of optional fields in addition to the required `client_id` that you can provide:

| Field                          | Description                                                                                                                                                                                                                                                 |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `client_id`                   | **Required.** Displayed when you create a new OAuth Client in your business settings                                                                                                                                                                        |
| `embed_into_id`               | **Optional.** Specifies the id of the HTML element on your page where an iframe for the Parallel flow will be inserted. If the `flow_type` is `embed`, this field is required.                                                                             |
| `environment`                 | **Optional.** Either `production` (default) or `demo` (for sandbox testing)                                                                                                                                                                               |
| `flow_type`                   | **Optional.** Controls where the user completes the Parallel Markets authentication flow. This can be set to one of:<br>- `overlay`: (Default) The authentication flow will be loaded in an interstitial overlay on your page. _Note: The redirect flow will be used on mobile device or when `window.innerWidth` < 500px or `window.innerHeight` < 650px._<br>- `redirect`: The user will be redirected to Parallel Markets to complete the authentication flow, then returned to the page on your site where the authentication redirect was initiated.<br>- `embed`: The authentication flow will be loaded in the HTML element of your choice on your page. If `embed` is selected, a value for the `embed_into_id` field must also be provided. |  
| `force_accreditation_check`   | **Optional.** If the entity is not known to be accredited (for instance, a new account or an expired accreditation), then force users through an accreditation flow after they authenticate. Default is `true`. Ignored if `scopes` doesn't include `accreditation_status`. See more details [on the Possible Flows page](https://developer.parallelmarkets.com/docs/1.x/server/flows). |
| `force_identity_check`         | **Optional.** If the entity has not completed a KYC/AML identity process recently then force the user through an identity submission/review flow after they authenticate. Default is `true`. Ignored if `scope` doesn't include `identity`. See more details [on the Possible Flows page](https://developer.parallelmarkets.com/docs/1.x/server/flows). |
| `scopes`                       | **Optional.** An array of scopes that identify the resources that your application would like to request access to. These values inform the consent screen that Parallel Markets displays to the user and the flows the user goes through. Valid scopes are listed in the [Scopes](https://developer.parallelmarkets.com/docs/1.x/server/scopes) section. Includes `profile` and `accreditation_status` by default. |
| `show_dismiss_button`          | **Optional.** If `show_dismiss_button` is true and `flow_type` is `overlay`, the interstitial overlay will include a close button in the upper right corner of the overlay. This allows users to close the overlay and return to the original page display without completing a flow. Default is `false`. |
| `identity_claim_override_id`   | **Optional.** An integer ID value used to configure custom thresholds for the identity flow. This would be provided by Parallel based on your custom requirements (if any).                                                                                     |
| `verbose`                      | **Optional.** Show debug logging messages in the console (at the "Verbose" logging level). Default is `false`.                                                                                                                                            |
