> 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/sdks/sdk-web/introduccion/primeros-pasos.md).

# Getting started

Once the SDK Web is installed, you need to perform an initial setup so that it works correctly in your application.

## Define the Component

The library provides a **loader** to define the custom component. It must be called so the browser can interpret it correctly.

```js
import { defineCustomElements as defineFacephiSdkCustomComponent } from '@facephi/sdk-web-wc/loader';

// Associates the custom elements with the window object
defineFacephiSdkCustomComponent(window);
```

We recommend adding an alias for the SDK's custom component definition.

***

## Obtain a License

To use the SDK Web, request a **license** from the Facephi support team. Once you have it, use the provided **ApiKey** to configure the SDK:

```jsx
<facephi-sdk-provider apikey={process.env.FACEPHI_SDK_APIKEY}>
  {/* Widgets go here */}
</facephi-sdk-provider>
```

> Each license (ApiKey) is associated with the credentials required to use the different components and features internally, linked to the domain where it will be used.

***

## How is it used?

SDK Web follows the **Web Components**standard, using a provider component called `<facephi-sdk-provider>`. This provider wraps all the SDK's logic and provides the essential functionality required for the widgets to work correctly.

It is **mandatory** to include `<facephi-sdk-provider>` in your application. Without it, the widgets **will not work correctly**. This provider acts as the base layer for integrating the SDK into your application.

***

### Integration Example

To get started, wrap `<facephi-sdk-provider>` around your application or the widgets you want to use. Below is an example of integrating the **SelphID** widget within the provider:

```jsx
import { Language, TypeFamily } from '@facephi/sdk-web-wc';

<facephi-sdk-provider
  apikey={process.env.FACEPHI_SDK_APIKEY}
  type={TypeFamily.onboarding}
  language={Language.en}
>
  <facephi-selphid-widget />
</facephi-sdk-provider>
```

This structure ensures that the SelphID widget works correctly with all the required functionality provided by the SDK provider.

You can find all the configuration information for the SDK Provider Component in [this section](https://docs.facephi.com/docs.facephi-en/sdks/sdk-web/componentes/sdk-provider.md).

For more comprehensive integration examples, see the [programming examples page](https://docs.facephi.com/docs.facephi-en/sdks/sdk-web/frameworks-y-samples.md).

***

## Next steps

* Configure the Components and modules to suit your needs.
* Explore the [Integration examples](https://docs.facephi.com/docs.facephi-en/products/landing/ejemplos-de-integracion.md).
* Review the specific sections for each module, such as [Selphi](https://docs.facephi.com/docs.facephi-en/sdks/sdk-web/componentes/selphi-biometria-facial.md), [SelphID](https://docs.facephi.com/docs.facephi-en/sdks/sdk-web/componentes/selphid-documentos.md) or [Video Recording](https://docs.facephi.com/docs.facephi-en/sdks/sdk-web/componentes/video-recording-video-grabacion.md).

<br>
