> 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/instalacion.md).

# Installation

Installation is easy, whether through NPM or CDN.

## **Installation with NPM**

For installation with npm, the requirement is to have **nodejs** and **npm** installed. For more documentation on this aspect, see here:

<https://nodesource.com/blog/an-absolute-beginners-guide-to-using-npm/>

Once this step is completed, installation is very simple; in your repository's command line, run:

```bash
npm install @facephi/landing-sdk
```

This will add the SDK to your project for use as follows:

```javascript
import LandingSDKClient from '@facephi/landing-sdk';

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

Where the API key will be provided by us or generated by you through the Landing Builder.

To invoke the POST, we will use the following command:

```javascript
landingSDK.callLanding();
```

For example:

```html
<html>
  <script type="module">
    import LandingSDKClient from './dist/landing-sdk.js';
    const landingSDK = new LandingSDKClient('YOUR_APIKEY');

    const callLanding = () => {
      landingSDK.callLanding();
    }

    window.callLanding = callLanding;

  </script>
  <body>
    <div>
      Landing SDK Client
      <button onclick="callLanding()">Go to the Landing page</button>
    </div>
  </body>
</html>
```

***

## **Installation with CDN**

Installation from CDN is very simple, since you don't have to perform any prior installation steps, just add it as follows:

```html
<html>
  <script type="module">
    import LandingSDKClient from 'https://sdk-web.facephi.pro/landing-sdk/landing-sdk.js';
    const landingSDK = new LandingSDKClient('YOUR_APIKEY');

    const callLanding = () => {
      landingSDK.callLanding();
    }

    window.callLanding = callLanding;

  </script>
  <body>
    <div>
      Landing SDK Client
      <button onclick="callLanding()">Go to the Landing page</button>
    </div>
  </body>
</html>
```

***

## Use via iframe

If you use the components inside a **iframe** it is recommended **to keep the focus within the container** that integrates the SDK Web components.
