Subscription Endpoint
The subscription endpoint delivers VPN configuration directly to client applications. Unlike the rest of the API, this is a GET request that returns a VPN config file — not JSON.
GET https://network-api.adaptgroup.app/sub/{subscription_uuid}
This URL is returned as subscription_url in the Create subscription response and should be passed directly to the user's VPN client.
How it works
When a VPN client requests this URL, the server:
- Validates the subscription — checks it's active and not frozen
- Identifies the device by
X-Hwidheader or device model - Checks device limit — rejects if exceeded
- Returns the VPN configuration in the format requested by the client
If the client sends an Accept: text/html header (e.g. opening the URL in a browser), the server returns an HTML page instead — configurable in the dashboard.
Request headers
The VPN client should pass the following headers. These are used for device identification and to return the correct config format.
| Header | Required | Description |
|---|---|---|
User-Agent | No | Client application user agent |
Accept | No | Requested content type. If text/html — returns browser page |
X-Hwid | Recommended | Hardware ID of the device. Used for reliable device identification. Without it, identification falls back to X-Device-Model — each new model value registers as a new device |
X-Device-Model | Recommended | Device model name. Used as fallback if X-Hwid is not provided |
X-Device-Os | No | Operating system (ios, android, windows, macos, linux) |
X-Ver-Os | No | OS version |
Response
Returns a VPN configuration file. The format depends on the client's User-Agent and Accept headers — it can be base64-encoded text, JSON, or YAML depending on the client type.
Response headers
| Header | Description |
|---|---|
Content-Disposition | Always attachment; filename="subscription.txt" |
Profile-Title | Base64-encoded profile name |
Profile-Update-Interval | How often the client should refresh the config (in hours) |
Profile-Web-Page-Url | Optional web page URL for the profile |
Support-Url | Optional support URL |
Announce | Optional base64-encoded announcement message |
Subscription-Userinfo | Traffic usage info: upload=...; download=...; total=...; expire=... |
Device limit
Each subscription has a maximum number of devices (devices field). Devices are identified by X-Hwid header. If the header is not present, identification falls back to device model.
If the device limit is reached and an unknown device tries to connect, the server returns an error VLESS key with a message instead of a valid config.
Error responses
When an error occurs, the server returns a valid VPN config containing a single non-functional VLESS key with an error message encoded in the fragment. This allows VPN clients to display the error to the user.
| Situation | Message |
|---|---|
| Subscription not found | ❌ Подписка не найдена |
| Subscription inactive | ❌ Подписка неактивна |
| Subscription frozen | ❌ Подписка заморожена |
| Device limit exceeded | ❌ Превышен лимит устройств (N) |
Browser behavior
If the URL is opened in a browser (Accept: text/html), the response depends on the integration settings configured in the dashboard:
| Mode | Behavior |
|---|---|
disabled | Custom page is disabled |
default | Returns a default AdaptGroup page |
redirect | Redirects to a custom URL |
html | Returns a custom HTML page uploaded to the dashboard |