Skip to main content

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:

  1. Validates the subscription — checks it's active and not frozen
  2. Identifies the device by X-Hwid header or device model
  3. Checks device limit — rejects if exceeded
  4. 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.

HeaderRequiredDescription
User-AgentNoClient application user agent
AcceptNoRequested content type. If text/html — returns browser page
X-HwidRecommendedHardware 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-ModelRecommendedDevice model name. Used as fallback if X-Hwid is not provided
X-Device-OsNoOperating system (ios, android, windows, macos, linux)
X-Ver-OsNoOS 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

HeaderDescription
Content-DispositionAlways attachment; filename="subscription.txt"
Profile-TitleBase64-encoded profile name
Profile-Update-IntervalHow often the client should refresh the config (in hours)
Profile-Web-Page-UrlOptional web page URL for the profile
Support-UrlOptional support URL
AnnounceOptional base64-encoded announcement message
Subscription-UserinfoTraffic 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.

SituationMessage
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:

ModeBehavior
disabledCustom page is disabled
defaultReturns a default AdaptGroup page
redirectRedirects to a custom URL
htmlReturns a custom HTML page uploaded to the dashboard
© 2026 AdaptGroup LLC. All rights reserved.
30 N Gould St Ste R, Sheridan, WY 82801, USA
Back to top