# Add Nova Experience to Your Customer PortalTo connect a customer portal to a Nova cPanel & WHM server: embed a Nova Prompt widget, then use WHM API 1's createacct and create_user_session functions to create the cPanel account, generate a one-time login session carrying the user's prompt, and redirect into the Nova Prompt interface. create_user_session requires a base64-encoded promptToken (max 5000 decoded characters) and the cpaneld service. WHMCS billing customers can instead use the official Nova Experience on cPanel provisioning module, which includes a preconfigured landing page.

You can add Nova to your customer portal by embedding the Nova script directly into a page and connecting to your Nova-enabled cPanel & WHM server.

{{< callout context="note" icon="outline/info-circle" >}}

This integration applies to Nova Experience only. Customers who reach Nova through cPanel Meridian sign in from their own cPanel account instead. We plan to introduce this feature for [Nova in cPanel Meridian](/en/partners/cpanel/offer-nova-in-cpanel-meridian/) in a future release.

{{< /callout >}}

{{< callout context="tip" icon="outline/rocket" >}}

If you use WHMCS, we recommend using the official Nova Experience on cPanel provisioning module instead. It includes a preconfigured landing page that you can add to your online store. For more information, read our [Use the Nova Experience on cPanel Module in WHMCS](/en/partners/integration-guides/use-the-whmcs-nova-experience-on-cpanel-module/) documentation.

{{< /callout >}}

## Step 1: Create a Nova Prompt page and embed the Nova script

Create a Nova Prompt page in your customer portal and embed the Nova script in it.

You can customize the script to:

- Adjust the styles of the prompt field.
- Pass the user-entered prompt as a parameter.

For more information, read our [Nova Prompt Widget Integration Guide](/en/partners/integration-guides/nova-prompt-widget-integration-guide/) documentation and review our <a href="https://embeded.nova.webpros.com/" target="_blank">example of an embedded prompt</a>.

## Step 2: Establish communication with the cPanel & WHM server

When a user enters a prompt and clicks _Start Building_, your system should trigger the signup and signin processes.

To create this automation, you can use WHM API 1 to establish communication between your customer portal and the Nova cPanel & WHM server.

**For new users:**
   - Use [WHM API 1's `createacct`](#create-a-nova-cpanel-account) function to create a new user account with the Nova package.
   - Then, use [WHM API 1's `create_user_session`](#create-a-cpanel-account-session) function to create a cPanel session and include the user's prompt as a parameter.

**For existing users:**
   - Use [WHM API 1's `create_user_session`](#create-a-cpanel-account-session) function to create a cPanel session and include the user's prompt as a parameter.

{{< callout context="caution" icon="outline/alert-triangle" >}}

Currently, each time a user logs in to Nova, cPanel generates an API token for Nova and sends the user a notification email. This can create unnecessary spam in the user's mailbox. To resolve this issue:

- Do not include an email when creating the cPanel account, or remove the email address from the existing cPanel account.
- Disable the _API Token Created_ email in WHM's _Contact Manager_ interface (_WHM >> Home >> Server Contacts >> Contact Manager_).

{{< /callout >}}

### Create a Nova cPanel account

To create a Nova cPanel account, use WHM API 1's <a href="https://api.docs.cpanel.net/openapi/whm/operation/createacct/" target="_blank">`createacct`</a> function.

When you run the `createacct` function, you must specify the correct `plan` parameter value. The `plan` parameter controls which package the function assigns to the cPanel account. When you send the API call, use one of the Nova packages that you created on your cPanel & WHM server. For more information about required Nova packages (plans) for each Nova deployment, read our [Nova for Partners](/en/partners/nova-for-partners/) documentation.

| Parameter | Description |  <div style="width:120px">Example</div> |
| ---- | ---- | ---- |
| `username`  | The Nova cPanel account user. You or your customer determine this parameter's value. | `example1` |
| `plan` | The package name for the Nova cPanel account. You determine this parameter's value by the package you created for your Nova offerings. | `nova-build` |

#### Browser-based call example

```
https://server.cpanel-nova-server.com:2087/cpsess1539046834/json-api/createacct?api.version=1&username=example1&plan=nova-basic
```

### Create a cPanel account session

Use WHM API 1's <a href="https://api.docs.cpanel.net/openapi/whm/operation/create_user_session/" target="_blank">`create_user_session`</a> function to generate a one-time login URL for the Nova user's account.

| <div style="width:115px">Parameter</div>  | Description | <div style="width:200px">Example</div> |
| ---- | ---- | ---- |
| `user` | The Nova cPanel account user. | `example1`|
| `promptToken` | The prompt token to pre-populate the user's website-generation goals when logging into the Nova interface. {{< callout context="note" icon="outline/info-circle" >}}<ul><li>This value must be base64-encoded.</li><li>Maximum decoded length is 5000 characters.</li></ul>{{< /callout >}} | `promptToken=SSB3YW50IHRvIGNyZWF0ZSBhIHJlc3RhdXJhbnQgd2Vic2l0ZQ==` |
| `service` | The session's service. In this example, we are connecting to the cPanel daemon. | `cpaneld` |

#### Browser-based call example

```
https://server.cpanel-nova-server.com:2087/cpsess1539046834/json-api/create_user_session?api.version=1&service=cpaneld&user=example1&promptToken=SSB3YW50IHRvIGNyZWF0ZSBhIHJlc3RhdXJhbnQgd2Vic2l0ZQ==
```

#### Example return output

```
data:
  cp_security_token: /cpsess8341218523
  expires: '1767902267'
  service: cpaneld
  session: example1:98ly3rv7sLWxbFne:create_user_session,88f6d68eccc54ddbd9c4d829eea3eb4e
  url: https://192-0-2-0.cprapid.com:2083/cpsess8341218523/login/?session=example1%3a98ly3rv7sLWxbFne%3acreate_user_session%2c88f6d68eccc54ddbd9c4d829eea3eb4e
metadata:
  command: create_user_session
  reason: Created session
  result: 1
  version: 1
```

## Step 3: Redirect to the Nova Prompt interface

After the `create_user_session` API call completes successfully, the system will redirect the user to the Nova Prompt interface, where they will see the prompt that you added in Step 1.

From here, users can start using Nova to build their first website or web app.
