# Generate Onboarding URL

## Introduction

A unique URL can be generated for each onboarding session. Most of the values come from the previously created <Glossary>Session Token</Glossary>. For that reason, configurations that you might want attached to the generated URL, such as `configurationId`  or ` redirectionUrl`, must be sent in the previous [Start onboarding](ref:startinterview) step.

Check the [fetch onboarding url](ref:getonboardingurl) documentation for a full reference of the endpoint's inputs and output.

## `/omni/onboarding-url` requests

This request uses the following header values:

### Headers

| Header                 | Value                                                                 |
| :--------------------- | :-------------------------------------------------------------------- |
| `X-Incode-Hardware-Id` | **Required**: The <Glossary>Session Token</Glossary> for this session |
| `api-version`          | **Required**: 1.0                                                     |
| `clientId`             | **Required**: Your client ID as provided in the query params.         |

These are the only required header values unless you are only using a QR code. Additional parameters are recommended if your onboarding Flow includes SMS verification, desktop verification, or both. See the [fetch onboarding url](ref:getonboardingurl) documentation for more information.

## Sample code

```curl
curl --location 'https://demo-api.incodesmile.com/0/omni/onboarding-url' \
--header 'Content-Type: application/json' \
--header 'api-version: 1.0' \
--header 'X-Incode-Hardware-Id: <<TOKEN>>' \

```
```javascript Nodejs
const axios = require('axios');

const params = new URLSearchParams({ clientId: <<clientId> });
const config = {
  url: 'https://demo-api.incodesmile.com/0/omni/onboarding-url',
  headers: { 
    'Content-Type': 'application/json', 
    'api-version': '1.0', 
    'X-Incode-Hardware-Id': <TOKEN>,
  }
};

axios(config).then(function (response) {
  const url = response.data.url;
  console.log(url);
}).catch(function (error) {
  console.log(error);
});

```
