X-Meta header

Last updated October 8, 2026

For the app to show the user the expiry date, traffic used and country, return an X-Meta header together with the configuration. It’s optional: without it the profile works as usual.

Format

The value is base64 (standard alphabet, with = padding) of a JSON object:

{
  "expires_at": 1794009600000,
  "traffic_used": 12884901888,
  "traffic_limit": 107374182400,
  "country_iso3": "CHE",
  "provider_url": "https://example.com",
  "provider_info_url": "https://example.com/cosmos.json"
}
X-Meta: eyJleHBpcmVzX2F0IjoxNzk0MDA5NjAwMDAwLCJ0cmFmZmljX3VzZWQiOjEyODg0OTAxODg4LCJ0cmFmZmljX2xpbWl0IjoxMDczNzQxODI0MDAsImNvdW50cnlfaXNvMyI6IkNIRSIsInByb3ZpZGVyX3VybCI6Imh0dHBzOi8vZXhhbXBsZS5jb20iLCJwcm92aWRlcl9pbmZvX3VybCI6Imh0dHBzOi8vZXhhbXBsZS5jb20vY29zbW9zLmpzb24ifQ==

Fields

All fields are optional.

Field Format What the app shows
expires_at integer, Unix milliseconds Expiry on the profile card: “until 7 Nov”, within a week — “6 days left”, after it ends — “expired”
traffic_used integer, bytes Used in the current period
traffic_limit integer, bytes; absent — no limit A “used of limit” bar; no limit — ∞
country_iso3 ISO 3166-1 alpha-3, for example CHE The country with its flag on the main screen and in the widget. No flag for the country — the profile’s servers are shown instead
provider_url https://… or tg://… The Website button in the Provider tab, if the service info has no links of its own
provider_info_url https://… Address of the service info — name, logo and links (Service info)

If something’s wrong

  • No header, not base64, or not JSON inside — the profile is added and works, just without this data.
  • A field of the wrong type (a string instead of a number, a negative number, a date after the year 9999, a link that isn’t https or tg) — it’s skipped; the other fields still work.
  • Unknown fields are skipped.

Panel headers — subscription-userinfo, profile-title, support-url, profile-update-interval and others — are not read: everything the app needs is in X-Meta.