How to restrict an API token (IP addresses, expiry, read-only)

Updated 2026-10-29

On this page
  1. Steps
  2. What a refused request says
  3. Good to know
  4. Common questions

An API token works like a password for scripts and billing systems. Limit each token to what it needs, so a leaked token can do little harm.

Steps

  1. Open the token page:
    • Administrator or reseller: admin panel (https://<server>:2087) → API Tokens (section Account).
    • Customer: control panel (https://<server>:2083) → API tokens (section Advanced).
  2. Name — what the token is for, for example billing or deploy script (letters, digits, spaces, ., _, -; up to 64 characters).
  3. Allowed IP addresses (optional) — the addresses or ranges it may be used from, for example 203.0.113.10, 198.51.100.0/24. Leave empty to allow any address. Up to 50 entries; IPv6 works too.
  4. Expires — Never, or After 7 days, After 30 days, After 90 days or After 365 days.
  5. Tick Read only (cannot change anything) if the token only needs to look things up.
  6. Click Create token.
  7. Copy the token from the green box at once. It is shown only once.

The Limits column of Your tokens shows each token's restrictions, or "no limits".

What a refused request says

SituationAnswer
Used from an address not in the list"This API token may not be used from this address."
After its expiry date"This API token has expired."
A read-only token tries to change something"This API token can only read."

Good to know

  • Restrictions cannot be changed later. Create a new token with the right limits and Revoke the old one.
  • Last used shows when each token was last used. Revoke tokens you no longer use.
  • Wrong tokens count as failed logins and can get the sender's address blocked. Add a billing server's address with Always allow in Firewall and to the Whitelisted IPs of Brute Force Protection.
  • Administrator and reseller tokens also obey the admin panel's IP access list, if one is set.
  • A token stops working when its owner loses API access, for example when the account is suspended or its plan no longer includes API tokens.
  • Team members cannot create API tokens; only the account owner can.

Common questions

What does a read-only token allow?

Only reading: GET requests on /api/v1. On /json-api only version, applist, listaccts, accountsummary, listpkgs, showbw and gethostname.

I lost a token. Can I see it again?

No. Only a fingerprint of it is stored. Create a new token and revoke the old one.

Was this article helpful?

Still stuck?

Ask the AI about your exact situation — it answers from this knowledge base — or contact us.