API returns 401 Unauthorized, 403 or IP blocked

Updated 2026-10-29

On this page
  1. Symptoms and causes
  2. Fix
  3. Still not working?

Every refused API request says why in error (REST API) or in metadata.reason (/json-api). Find the message below.

Symptoms and causes

AnswerCause
401 UnauthorizedNo Authorization header, a mistyped or revoked token, or the wrong kind of token (a customer token on the admin API, or the other way round).
401 This API token has expired.The token's Expires date has passed.
401 This API token may not be used from this address.The request comes from an address not in the token's Allowed IP addresses, or not in Admin panel access by IP (administrator and reseller tokens).
401 API access is not available for this account.The reseller lost the API tokens (billing systems) privilege, the customer's plan leaves out API tokens, or the account is suspended.
403 IP blockedToo many failed requests or logins from your address.
403 This API token can only read.A read-only token sent a POST.
403 This reseller does not have the privilege for this action.See reseller privileges.
403 This tool is not included in your plan.Customer API: the plan's feature list leaves the tool out.
422 with a messageThe request reached the server but was refused, for example Account not found. or Package not found.

On /json-api, the same refusals answer 403 with metadata.reason starting with Access denied.

Fix

Unauthorized

  1. Check the header is exactly Authorization: Bearer <token>, with no quotes or line breaks.
  2. Check the token still appears under Your tokens in API Tokens. If not, create a new one.
  3. Use an administrator or reseller token on /api/v1/accounts…, and a control panel token on /api/v1/me….

IP blocked

Every 401 answer (wrong, expired or wrong-kind token, or a token used from a wrong address) counts as a failed login. After Max failures (default 5) within Window (min) (default 15), the address is blocked for Block for (min) (default 15), at the panel and at the firewall.

  1. In the admin panel, open Brute Force Protection (section Security).
  2. Find the address under Blocked IPs and click Unblock.
  3. Add your billing server to Whitelisted IPs (comma separated) and click Save, so a mistake never blocks it again.
  4. Fix the token in your system before it retries.

Token not allowed from this address

Check the address your system really uses (for example its outgoing NAT address). Create a new token with the right Allowed IP addresses, or add the address to Admin panel access by IP.

Still not working?

  • Run the request with curl -v and read the HTTP status and body.
  • Check that the server's hostname certificate is valid if your client verifies TLS.
  • There is no fixed request-per-minute limit on the API, but every account creation, suspension or change starts a server task: see them in Task Queue.
Was this article helpful?

Still stuck?

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