# SDK

The **Digital Samba Embedded SDK** is distributed as a publicly available [**npm module**](https://www.npmjs.com/package/@digitalsamba/embedded-sdk).

#### For quick prototyping you can load it with a `<script>` tag from the [unpkg](https://unpkg.com/) public CDN:

{% code lineNumbers="true" %}

```javascript
<script crossorigin src="https://unpkg.com/@digitalsamba/embedded-sdk"></script>
const sambaFrame = DigitalSambaEmbedded.createControl({ url: YOUR_ROOM_URL });
sambaFrame.load();
```

{% endcode %}

#### For production integrations it is recommended to use **npm** and a bundler like [webpack](https://webpack.js.org/).

```
npm install @digitalsamba/embedded-sdk
```

#### Usage with NPM

Add our SDK to the dependency list using your preferred package manager:

`npm install @digitalsamba/embedded-sdk`

or

`yarn install @digitalsamba/embedded-sdk`

After installation, use it in your application code by doing the following:

{% code lineNumbers="true" %}

```javascript
import DigitalSambaEmbedded from '@digitalsamba/embedded-sdk';
const sambaFrame = DigitalSambaEmbedded.createControl({ url: YOUR_ROOM_URL });
sambaFrame.load();
```

{% endcode %}

{% hint style="info" %}
For detailed documentation on the initialization process, read about the [DigitalSambaEmbedded](https://docs.digitalsamba.com/reference/sdk/digitalsambaembedded-class) class and the initialization [code examples](https://docs.digitalsamba.com/reference/digitalsambaembedded-class#code-examples-of-the-possible-initoptions-combinations).
{% endhint %}

{% hint style="info" %}
Make sure to browse through the available [Methods](https://docs.digitalsamba.com/reference/sdk/methods) and [Events](https://docs.digitalsamba.com/reference/sdk/events) of the SDK.
{% endhint %}

The SDK is written in **TypeScript**, so type definitions are also available:

```javascript
import { SendMessageType, ReceiveMessageType /* ...etc */ } from '@digitalsamba/embedded-sdk';
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digitalsamba.com/reference/sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
