# Online

Adding a product license online is an essential operation that allows for real-time license activation and management through the Floating Server. Below are the steps to add a license using either the Floating Server API or the User Interface.

### Adding with the API

To add a license to the Floating Server, use the `/addProduct` API endpoint. This requires passing the product code along with either the license key or username/password combination as query parameters.

You need to provide the **product code** along with the required **credentials**. Once the license is successfully added, it will appear in the licenses list, along with its unique **license ID**.

{% hint style="info" %}
Starting from version 1.6.0:

* Multiple licenses (and corresponding license IDs) can now be associated with a single product code.
* After adding a license, its **license ID** can be used to address the specific license for further actions, as described in the following sections of this documentation.
  {% endhint %}

For more detailed information, visit [**Add license**](/floating-server/floating-server-v1/api-reference/license/add-license.md).

### Adding with the User Interface

In the Floating Server UI, you can activate a license online using either **User Authentication** or **Key Authentication**. Follow the section below based on the authentication method you choose.

{% stepper %}
{% step %}

### User Authentication

This method requires you to provide the product code, along with the username and password associated with the license.

![Adding a License with User Authentication](/files/a761703361788cc0920bc973720c98c79eb0975a)

Steps to follow:

* Select **"User auth"** from the dropdown in the **"Add product"** section.
* Enter the **Product Code**, **Username**, and **Password**.
* Click **Add** to activate the license.
  {% endstep %}

{% step %}

### Key Authentication

This method requires you to enter the product code and license key.

![](/files/1e72653a344c406283292131c2c854408e6bc054)

Steps to follow:

* Select **"Key auth"** from the dropdown in the **"Add product"** section.
* Enter the **Product Code** and **License Key**.
* Click **Add** to activate the license.
  {% endstep %}
  {% endstepper %}

#### Retrieve All Product Licenses

After adding multiple licenses to a product, retrieve a complete list of these licenses by sending a GET request to the `/productLicenses` endpoint with the product code provided as the `product` parameter. This endpoint was introduced in version v1.6.0.

```
http://<floating-server>/productLicenses?product=<your-product>
```

### How to Refresh

To refresh or update an online license, there is no dedicated endpoint or specific UI location. Simply re-add the existing license. For example, if License A is already visible in the UI, navigate to the page and add License A again — this will effectively refresh it.


---

# 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.licensespring.com/floating-server/floating-server-v1/license-options/online.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.
