# Login

<table><thead><tr><th>Parameters</th><th>Description</th></tr></thead><tbody><tr><td><pre><code>clientId
</code></pre></td><td><p></p><p>The 'clientId' is retrieved from the <a href="https://client.conscent.in/dashboard/integration">Client Integrations Page</a> of the ConsCent Client Dashboard.</p></td></tr><tr><td><pre><code>wrappingElementId
</code></pre></td><td>'wrappingElementId' is a mandatory string that is the id of an element (e.g. a div with absolute positioning on your website) within which you want the login popup to be embedded.</td></tr><tr><td></td><td></td></tr></tbody></table>

{% tabs %}
{% tab title="shell" %}

```sh
const csc = window._csc as any;
    csc('conscent-login', {
      debug: true,
      clientId: clientId,
      defaultEmail: defaultEmail || '',
      defaultName: defaultName || '',
      defaultPhone: defaultPhone || '',
      wrappingElementId: 'embed',
      successCallback: async (userDetailsObject: any) => {
        console.log('Success callback received from conscent login', userDetailsObject);
        setUserDetails(userDetailsObject);
        props.setShowLoginModal(false)
      },
      onCrossBtnClickSuccess: async () => {
        console.log('cross btn click successfully');
        props.setShowLoginModal(false)
      },
      unauthorizedCallback: () => {
        console.log('unauthorized callback called');
      },
    });
```

{% endtab %}

{% tab title="javaScript" %}

```javascript
const csc = window._csc as any;
    csc('conscent-login', {
      debug: true,
      clientId: clientId,
      defaultEmail: defaultEmail || '',
      defaultName: defaultName || '',
      defaultPhone: defaultPhone || '',
      wrappingElementId: 'embed',
      successCallback: async (userDetailsObject: any) => {
        console.log('Success callback received from conscent login', userDetailsObject);
        setUserDetails(userDetailsObject);
        props.setShowLoginModal(false)
      },
      onCrossBtnClickSuccess: async () => {
        console.log('cross btn click successfully');
        props.setShowLoginModal(false)
      },
      unauthorizedCallback: () => {
        console.log('unauthorized callback called');
      },
    });

```

{% endtab %}

{% tab title="php" %}

```php
const csc = window._csc as any;
    csc('conscent-login', {
      debug: true,
      clientId: clientId,
      defaultEmail: defaultEmail || '',
      defaultName: defaultName || '',
      defaultPhone: defaultPhone || '',
      wrappingElementId: 'embed',
      successCallback: async (userDetailsObject: any) => {
        console.log('Success callback received from conscent login', userDetailsObject);
        setUserDetails(userDetailsObject);
        props.setShowLoginModal(false)
      },
      onCrossBtnClickSuccess: async () => {
        console.log('cross btn click successfully');
        props.setShowLoginModal(false)
      },
      unauthorizedCallback: () => {
        console.log('unauthorized callback called');
      },
    });

```

{% endtab %}
{% endtabs %}

After integrating the Login script, the Login popup appears on the screen which can be customizable for all the Clients.

<figure><img src="/files/228jzuhuk4nYHBjFlr2n" alt="" width="375"><figcaption></figcaption></figure>

<figure><img src="/files/EYQnDqyLfhg0u9574U7l" alt="" width="372"><figcaption><p>Verify OTP Screen</p></figcaption></figure>


---

# 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.conscent.ai/version-1.0/login.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.
