> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cognigy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# xApp: Init Session

export const screen_type_1 = "connection screen"

export const default_text_1 = "Connecting..."

export const screen_type_0 = "intermediate screen"

export const default_text_0 = "Nothing to do..."

<a href="/release-notes/4.51"><Badge className="version-badge" color="blue">Updated in 4.51</Badge></a>

<Frame>
  <img src="https://mintcdn.com/cognigy-15abf2ba/xzKKSVUQG5P2_fcS/_assets/ai/develop/node-reference/xApp/init-xApp-session.png?fit=max&auto=format&n=xzKKSVUQG5P2_fcS&q=85&s=0d69133a57670b7e703cc696190d3bdb" alt="xApp Init Session Node configuration panel" style={{ width: 'auto' }} width="418" height="110" data-path="_assets/ai/develop/node-reference/xApp/init-xApp-session.png" />
</Frame>

## Description

This Node initializes a new xApp session.

After the execution of this Node, you can access the xApp in two different ways:

* [Without entering PIN Codes](#without-pin)
* [By entering PIN Codes](#with-pin)

### Without PIN

To require only a URL to access an xApp session, you can share a Session URL. This URL is available via the [xApp Session URL](/xApps/tokens#xapp-session-url) token.

The **xApp Session URL** token provides a URL, which is also accessible via `input.apps.url` in the input object.

With the provided link, a user can access the xApp page without requiring a PIN.

### With PIN

To allow users to access the xApp session via a PIN, share both a PIN and a PIN Page URL with the users.

This functionality is available via the [xApp PIN Page URL](/xApps/tokens#xapp-pin-page-url) token and the [xApp: Get Session PIN](/ai/agents/develop/node-reference/xApp/get-xApp-session-PIN) Node.

The **Get Session PIN** Node generates a PIN, which is accessible via the [xApp Session PIN token](/xApps/tokens#xapp-session-pin) or `input.apps.session.pin` in the input object.

The **xApp PIN Page URL** token provides a URL, which is also accessible via `input.apps.baseUrl` in the input object.

With the provided link, a user can access the PIN page and enter their provided PIN to gain access to the xApp.

## Parameters

<AccordionGroup>
  <Accordion title="Style Customization">
    | Parameter          | Type          | Description                                                                                                                                                                                                      |
    | ------------------ | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Background Color   | CognigyScript | A color that is displayed in the background of all Shell Page Screens. You can use CSS background-color values such as `hex`, `hsl+a`, and `rgb+a`.                                                              |
    | Text Color         | CognigyScript | A color that is used for textual content on all Shell Page Screens. You can use CSS color values such as `hex`, `hsl+a`, and `rgb+a`. Make sure that the text color has high contrast with the background color. |
    | Logo               | List          | You can choose to show the default logo, not any logo, or a custom logo. If you select the custom logo option, specify the Custom Logo URL.                                                                      |
    | Custom Favicon URL | CognigyScript | An image URL for the custom favicon.                                                                                                                                                                             |
    | Page Title         | CognigyScript | A text shown as a tab or window title. The title is displayed on all Shell Page Screens.                                                                                                                         |
  </Accordion>

  <Accordion title="xApp Screens">
    | Parameter           | Type          | Description                                                                                |
    | ------------------- | ------------- | ------------------------------------------------------------------------------------------ |
    | 'Loading' Text      | CognigyScript | Specify messages displayed to the user when the xApp page is loading                       |
    | 'Launch Error' Text | CognigyScript | Specify messages displayed to the user when the xApp page fails for some reason            |
    | 'xApp Error' Text   | CognigyScript | Specify messages displayed to the user when the xApp page encounters an error or is halted |
  </Accordion>

  <Accordion title="Intermediate Screen">
    The intermediate screen appears on the xApps page while the xApp is inactive, for example, after you have submitted data in the xApp and no other xApp is triggered.

    | Parameter          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
    | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Customization Type | Sets whether and how to customize the {screen_type_0}. Select one of the following options:<ul><li>**No customization** — displays <code>{default_text_0}</code> on the {screen_type_0}. This option is selected by default.</li><li>**Customized Texts** — displays custom text on the {screen_type_0}.</li><li>**Replace with xApps** — displays a custom page on the {screen_type_0}, optionally, with custom data. This option provides flexibility because you can create a page using HTML, CSS, and JavaScript and handle custom data dynamically.</li></ul> |
    | Text Override      | This parameter appears when you select **Customized Texts** in the **Customization Type** field. Enter the custom text to be displayed on the {screen_type_0}.                                                                                                                                                                                                                                                                                                                                                                                                      |
    | xApp Template      | This parameter appears when you select **Replace with xApps** in the **Customization Type** field. Enter the URL to the custom page to be displayed on the {screen_type_0}.                                                                                                                                                                                                                                                                                                                                                                                         |
    | xApp Template Data | This parameter is optional. It appears when you select **Replace with xApps** in the **Customization Type** field. Enter custom data in JSON format to be sent to the custom page. For example, you can use a [CognigyScript expression](/ai/platform-features/cognigyscript) in a JSON object, such as `{"name": "{{profile.firstname}}"}`, to fetch data from the Profile object and use it on the {screen_type_0} as a personalized message with the end user's name.                                                                                            |
  </Accordion>

  <Accordion title="Connection Screen">
    The connection screen appears while the browser is establishing the connection to the xApp page.

    | Parameter          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
    | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Customization Type | Sets whether and how to customize the {screen_type_1}. Select one of the following options:<ul><li>**No customization** — displays <code>{default_text_1}</code> on the {screen_type_1}. This option is selected by default.</li><li>**Customized Texts** — displays custom text on the {screen_type_1}.</li><li>**Replace with xApps** — displays a custom page on the {screen_type_1}, optionally, with custom data. This option provides flexibility because you can create a page using HTML, CSS, and JavaScript and handle custom data dynamically.</li></ul> |
    | Text Override      | This parameter appears when you select **Customized Texts** in the **Customization Type** field. Enter the custom text to be displayed on the {screen_type_1}.                                                                                                                                                                                                                                                                                                                                                                                                      |
    | xApp Template      | This parameter appears when you select **Replace with xApps** in the **Customization Type** field. Enter the URL to the custom page to be displayed on the {screen_type_1}.                                                                                                                                                                                                                                                                                                                                                                                         |
    | xApp Template Data | This parameter is optional. It appears when you select **Replace with xApps** in the **Customization Type** field. Enter custom data in JSON format to be sent to the custom page. For example, you can use a [CognigyScript expression](/ai/platform-features/cognigyscript) in a JSON object, such as `{"name": "{{profile.firstname}}"}`, to fetch data from the Profile object and use it on the {screen_type_1} as a personalized message with the end user's name.                                                                                            |
  </Accordion>
</AccordionGroup>

## More Information

* [xApp Tokens](/xApps/tokens)
* [xApp Nodes](/ai/agents/develop/node-reference/xApp/overview)
* [xApp: Get Session PIN](/ai/agents/develop/node-reference/xApp/get-xApp-session-PIN)
* [xApp: Show HTML](/ai/agents/develop/node-reference/xApp/set-html-xApp-state)
* [xApp: Show Adaptive Card](/ai/agents/develop/node-reference/xApp/set-AdaptiveCard-xApp-state)
* [xApps](/xApps/overview)
