# Javascript Integration

Integrate the Tutelar JS SDK to your website.

{% stepper %}
{% step %}

### Step 1

Just copy the below snippet and paste it before closing of head tag in your html.

```html
<script type="text/javascript" src="https://cdn.tutelar.io/js/v2/client"></script>
```

{% endstep %}

{% step %}

### Step 2

Call the below method in your script to initialise the Tutelar SDK to get client details.

```javascript
var tutelar = new Tutelar({"public_key" : "tutpk_xxxxxxxxx"});
```

You can get your Public key from the Client Dashboard from Access Settings.
{% endstep %}

{% step %}

### Step 3

Call the below method in your script to get client details.

```javascript
tutelar.getClientDetails();
```

{% endstep %}
{% endstepper %}


---

# 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.v2.tutelar.io/client-side-integrations/javascript-integration.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.
