> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-en/products/landing/metodos-de-integracion/landing-sdk/configuracion.md).

# Configuration

Landing SDK can be instantiated in different ways to adapt to the different available use cases.

Below we present the most common ones:

***

### Creation of the default Landing SDK object

To create an instance of the associated Landing, we will use the Landing SDK constructor:

```javascript
const landingSDK = new LandingSDKClient('YOUR_APIKEY');
```

This instance will have the default configuration.

It will now be possible to use the methods that Landing SDK offers.

***

### Configuration with a unique URL

{% hint style="info" %}
This method is only available starting from Version 0.4.0.
{% endhint %}

The SDK allows you to generate a unique URL for the destination pages; this URL will have a validation period of 15 minutes. After that time, the URL will be invalidated and a new one must be generated. It is important to configure in the Builder the parameter that allows you to disable public access to the destination pages.

To enable this method, the following configuration must be used:

```javascript
const landingSDK = new LandingSDKClient('YOUR_APIKEY',  {
  uniqueUrl: true
});
```

***

### **Configuration with Iframe**

The Landing SDK allows the destination page to be launched in an iframe that will overlay the client's page.

To enable this method, the following configuration must be used:

```javascript
const landingSDK = new LandingSDKClient('YOUR_APIKEY',  {
  iframe: true
});
```

{% hint style="warning" %}
**Note**: In case you use the components within a **iframe** it is necessary **to keep the focus within the container** that integrates the SDK Web components.
{% endhint %}

{% hint style="info" %}
To enable the SDK's iframe mode, Facephi support must configure the allowed URLs to embed the iframe. This is a critical security measure designed to protect your application and your users.

If the allowed URLs are not configured correctly, attackers could embed the iframe in unauthorized websites to impersonate your brand. This could lead to phishing attacks targeting your customers, which could compromise sensitive information.

By applying URL restrictions, only trusted and preconfigured domains will be able to use the iframe, significantly reducing the risk of such attacks.

If you need iframe mode for your integration, please contact Facephi support to provide a list of the URLs where the iframe will be embedded.
{% endhint %}

{% hint style="danger" %}
With this method enabled, when the method is called `callLanding`, the destination page will be added inside the client's page with an iframe. Note that this iframe is placed occupying 100% of the page in a layer with `zIndex 100000`. That is, if something is placed with a `zIndex` higher one, it will overlay the destination page.
{% endhint %}

Once the destination page process finishes, the iframe will close. If you want to run any functionality after the destination page process has finished, you have a method that runs next:

```javascript
landingSDK.callLanding({
    onFinish: () = {
      /// Run your code here
    }
  })
```
