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.

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 Integration Widget Guide documentation and review our example of an embedded prompt.

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:

For existing users:

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 » Notifications.

Create a Nova cPanel account

To create a Nova cPanel account, use WHM API 1’s createacct 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 the cPanel & WHM server. For more information about required packages (plans), read our Nova cPanel Package documentation.

ParameterDescription
Example
usernameThe Nova cPanel account user. You or your customer determine this parameter’s value.example1
planThe package name for the Nova cPanel account. You determine this parameter’s value by the package you created for your Nova offerings.nova-basic
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 create_user_session function to generate a one-time login URL for the Nova user’s account.

Parameter
Description
Example
userThe Nova cPanel account user.example1
promptTokenThe prompt token to pre-populate the user’s website-generation goals when logging into the Nova interface.
  • This value must be base64-encoded.
  • Maximum decoded length is 5000 characters.
promptToken=SSB3YW50IHRvIGNyZWF0ZSBhIHJlc3RhdXJhbnQgd2Vic2l0ZQ==
serviceThe session’s service. In this example, we are connecting to the cPanel daemon.cpaneld
Browser-based call example
https:server.cpanel-nova-server.com:2087cpsess1539046834/json-api/create_user_session?api.version=1&service=cpaneld&user=example1&promptToken=SSB3YW50IHRvIGNyZWF0ZSBhIHJlc3RhdXJhbnQgd2Vic2l0ZQ
Example return output
data:
  cp_security_token: /cpsess1324512216
  expires: '1767902267'
  service: cpaneld
  session: example1:98ly3rv7sLWxbFne:create_user_session,88f6d68eccc54ddbd9c4d829eea3eb4e
  url: https://192-0-2-0.cprapid.com:2083/cpsess8341218523/login/?session=example16%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.