# Limited Links

<figure><img src="/files/1O9ZOfYkdmkezJOPD29P" alt="" width="188"><figcaption></figcaption></figure>

Limited links are a feature that allows you to restrict the number of devices that can add a subscription (link) to the application.\
In your account dashboard `happ-proxy.com`, you specify the URL of your subscription, set the maximum number of allowed devices, and click "Generate Link."\
You can then share the generated link with users, knowing that the subscription can only be installed on the specified number of devices — exceeding the limit is not possible.

Limited links can be created both through the web interface and via the API.

***

### **Creating via the Website**

1. Provide the **unencrypted URL** of your subscription on the link‑creation page.
2. Specify the **install limit** (the maximum number of devices).
3. When you generate the link:
   * An **InstallID** parameter is automatically appended to the URL.
   * The link’s domain is stored in our database as a **SHA‑256 hash** (we never keep the raw domain for added security).

You’ll receive an **encrypted link** containing the InstallID.

***

### **Creating via the API** Send a GET request to:

```
https://api.happ-proxy.com/api/add-install?
  provider_code={provider_code}&
  auth_key={auth_key}&
  install_limit={install_limit}
```

* **{provider\_code}** — your provider code (from your profile)
* **{auth\_key}** — your authorization key (from your profile)
* **{install\_limit}** — maximum number of devices allowed

**API Response**

* **Success**

  ```json
  {
    "rc": 1,
    "msg": "Ok",
    "install_code": "6P0hVao1fG5e"
  }
  ```
* **Error**

  ```json
  {
    "rc": 0,
    "msg": "Error description"
  }
  ```

Take the returned **install\_code** and add it to your link as the **InstallID** parameter.

***

### **Example**

* Original URL:

  ```
  https://url.com/sub
  ```
* Final link:

  ```
  https://url.com/sub#Your_TITLE?installid=Abcd1234
  ```

> **Tip:** Encrypt the link so users cannot remove the InstallID parameter.

***

### **How It Works**

When a link is added, the application calculates the SHA‑256 hash of the domain and sends a request to:

```
https://check.happ-proxy.com/install?id={domain_hash}&installid={InstallID}
```

In response, it receives the `ProviderID` and the link status.

If the request cannot be transmitted (for example, if the site is blocked), the application will automatically retry after a VPN connection is established.

The `happ-proxy.com` server receives the device's `HWID` and responds positively if the installation limit for the link has not been exceeded.\
If the limit is exceeded, the server returns a denial, and the application displays the following message:\
\&#xNAN;**"The subscription administrator has restricted access. Please contact technical support."**


---

# 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.happ-proxy.com/getting-started/quickstart.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.
