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

Updated 2026-10-29

On this page
  1. Allowed IP addresses
  2. Expires
  3. Read only (cannot change anything)
  4. Good to know
  5. Common questions

A token that leaks can do everything its owner can. Limits make a leaked token much less useful. You set them when you create the token; to change them, create a new token and revoke the old one.

Allowed IP addresses

In Allowed IP addresses (optional), enter the addresses or ranges the token may be used from, separated by commas, spaces or new lines:

203.0.113.10, 198.51.100.0/24, 2001:db8::/48
  • IPv4 and IPv6, single addresses or CIDR ranges. Up to 50 entries.
  • Empty: the token works from anywhere.
  • From any other address the API answers HTTP 401 with This API token may not be used from this address.

Use this for a billing system with a fixed address.

Expires

Choose Never, or After 7 days, After 30 days, After 90 days or After 365 days. After that the API answers 401 with This API token has expired. The token list shows until and the date, or expired.

Read only (cannot change anything)

Tick it for monitoring and reporting scripts.

  • On the REST API, only GET requests work. Any POST answers 403 with This API token can only read.
  • On /json-api, only version, applist, listaccts, accountsummary, listpkgs, showbw and gethostname work.
  • A read-only token cannot create sign-in links.

Good to know

  • If Admin panel access by IP is set in Brute Force Protection, tokens of administrators and resellers also work only from those addresses, in addition to the token's own list.
  • Several failed requests from one address get the address blocked. Add your billing server to the Whitelisted IPs of Brute Force Protection or the Firewall allow list. See API errors.
  • The Limits column of Your tokens shows each token's limits, or no limits.

Common questions

Can I change the allowed addresses of an existing token?

No. Create a new token with the new addresses, update your system, then 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.