# Return AI App Builder SSO URL

This function returns an AI App Builder website's SSO URL.

Note:

  This function requires that your package includes the AI App Builder feature.

Important:

  When you disable the AI App Builder feature, the system disables this function.

Endpoint: GET /Nova/get_sso_link
Version: 11.138.0.19
Security: BasicAuth

## Query parameters:

  - `colorScheme` (string)
    The color scheme Meridian is using, so Nova can match it.
    Enum: "light", "dark", "auto"

  - `domain` (string)
    The domain to use for the AI App Builder website.
    Example: "example.com"

  - `promptToken` (string)
    A base64-encoded prompt token to pre-populate the user's website generation goals.
This allows hosting companies to collect user intent before SSO and pass it through
to the Nova interface.

Requirements:

  * Valid base64 encoding — You can use standard or URL-safe variants.
  * Maximum 5000 characters after the system decodes it.
  * Non-empty content — The system ignores empty or whitespace-only prompts.


Example use case:

  A hosting company builds a custom landing page that asks, "What kind of website
  do you want to create?" The user's response is base64-encoded and passed via
  this parameter, allowing Nova to use it as the initial generation prompt.
    Example: "SSB3YW50IHRvIGNyZWF0ZSBhIHBvcnRmb2xpbyB3ZWJzaXRlIGZvciBteSBwaG90b2dyYXBoeSBidXNpbmVzcw=="

  - `return_url` (string)
    Where Nova's "Back to cPanel" control returns the user. Required for a
regular account and rejected for a standalone one. Must be an https URL
of at most 2048 characters, on the host the request was made to, with
the path "/frontend/meridian/index.html" (optionally prefixed by a
cPanel session token) and the in-product route in the fragment.
    Example: "https://cpanel-server.tld:2083/frontend/meridian/index.html#/websites"

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "get_sso_link"

  - `module` (string)
    The name of the module called.
    Example: "Nova"

  - `result` (object)

  - `result.data` (string)
    The SSO link to the AI App Builder.
    Example: "https://my.sitehub.io/website/edit?ssotoken=exampletokenstring"

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.metadata.transformed` (integer)
    Post-processing may have transformed the data.
    Enum: 1

  - `result.status` (integer)
    - 1 - Success.
- 0 - Failed: Check the errors field for more details.
    Enum: 1, 0

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running an API.


