Errors & rate limits
All v2 APIs report errors with real HTTP status codes and one JSON envelope containing a stable machine-readable code. This page lists every code, the order in which requests are checked, and the rate limits with their headers.
The error envelope
The App API (/v2) and the Reseller API (/reseller/v2) render every
error as:
{
"error": {
"code": "subscription_required",
"message": "An active subscription is required."
}
}
codeis stable: branch on it, not on the HTTP status alone and never onmessage.messageis human-readable English, meant for logs and developers. Show your own localised text to users.fieldsis present only forvalidation_failed: an object mapping each invalid input to a list of messages.
{
"error": {
"code": "validation_failed",
"message": "The given data was invalid.",
"fields": {
"email": ["The email field must be a valid email address."],
"password": ["The password field must be at least 8 characters."]
}
}
}
Field names are the body/query parameter names. Header problems use
device_id (X-Device-Id), device_name (X-Device-Name) and
device_platform (X-Device-Platform); nested inputs use dot notation
(event.id, sessions.0.client_id).
Error codes
| HTTP | code |
When |
|---|---|---|
| 400 | invalid_app_key |
X-App-Key missing or unknown (App API). |
| 401 | unauthenticated |
Missing, invalid or revoked user token; missing/invalid reseller key; wrong RevenueCat webhook secret. |
| 401 | invalid_credentials |
Wrong email or password (login, reseller verify), or wrong current password (PUT /v2/me/password, DELETE /v2/me). |
| 403 | wrong_brand |
A user token used with another brand's app key. |
| 403 | subscription_required |
The call needs an active plan: GET /v2/vpn/profile, PUT /v2/wireguard/key, creating manual credentials (both APIs). |
| 403 | access_denied |
TV sign-in: the user denied the code. |
| 403 | forbidden |
Generic "not allowed" (not currently produced by any endpoint; handle like a 403). |
| 404 | not_found |
Unknown route, or a resource that does not exist or is not yours/your brand's. |
| 405 | method_not_allowed |
Wrong HTTP method for the path. |
| 409 | account_exists |
Register/create with an email that already has an account at the brand (including legacy customers who must sign in), or PATCH of an email in use. |
| 409 | wireguard_key_in_use |
The WireGuard public key belongs to another device. |
| 409 | device_limit |
Reserved. Not currently produced (the connection limit is enforced at VPN login, see GET /v2/sessions). |
| 410 | expired_token |
TV sign-in: the device code expired, is unknown or was already used. |
| 422 | validation_failed |
Invalid input; see fields. |
| 422 | invalid_reset_code |
Password reset code wrong, expired or out of attempts. |
| 428 | authorization_pending |
TV sign-in: not approved yet, keep polling. |
| 429 | slow_down |
TV sign-in: polling faster than interval. |
| 429 | rate_limited |
Rate limit exceeded (see below). |
| 4xx | http_error |
Any other client error status (fallback). |
| 500 | server_error |
Something went wrong on our side, e.g. the VPN profile template is temporarily unavailable. Safe to retry later. |
Each endpoint's possible codes are listed in the API references: App, Reseller.
Order of checks (App API)
Requests are checked in this order, and the first failure wins:
X-App-Key→400 invalid_app_key(even if the token is also invalid)- Bearer token (signed-in routes) →
401 unauthenticated - Rate limit →
429 rate_limited - Token of another brand →
403 wrong_brand - Active plan (profile, WireGuard key) →
403 subscription_required - Input validation →
422 validation_failed - The operation itself (
404,409, …)
On the Reseller API the reseller key is checked first (401), then the rate
limit.
Rate limits
| API | Endpoints | Limit | Counted per |
|---|---|---|---|
| App | POST /v2/auth/register, /login, /forgot-password, /reset-password |
10 / minute | brand + IP + email |
| App | POST /v2/auth/device-code |
10 / minute | brand + IP |
| App | POST /v2/auth/device-token |
60 / minute | brand + IP |
| App | POST /v2/support/logs |
5 / hour | brand + X-Device-Id (IP when absent) |
| App | everything else, incl. GET /v2/app/config and GET /v2/ip |
120 / minute | signed-in account, else IP |
| App | POST /v2/webhooks/revenuecat |
none | |
| Reseller | all | 600 / minute | brand (reseller key) |
Throttled responses carry these headers:
| Header | On | Meaning |
|---|---|---|
X-RateLimit-Limit |
every throttled-route response | The limit for this window |
X-RateLimit-Remaining |
every throttled-route response | Requests left in the window |
Retry-After |
429 |
Seconds until you may retry |
X-RateLimit-Reset |
429 |
Unix timestamp when the window resets |
HTTP/1.1 429 Too Many Requests
Retry-After: 37
X-RateLimit-Limit: 10
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1796233477
Content-Type: application/json
{"error": {"code": "rate_limited", "message": "Too many requests. Please try again later."}}
Retrying
| Situation | Do |
|---|---|
429 rate_limited |
Wait Retry-After seconds, then retry. Never retry in a tight loop. |
429 slow_down (TV) |
Increase your polling interval by 5 seconds. |
500 server_error, 502/503/504, network errors |
Retry idempotent requests (GET, PUT, DELETE) with exponential backoff and jitter, e.g. 1s, 2s, 4s, 8s, capped at ~30s. Retry POSTs only when duplicates are harmless (login is fine; creating a manual credential twice creates two). |
401 unauthenticated (App API) |
The token is gone: sign the user out. |
400 invalid_app_key |
Configuration error or a rotated key: do not retry; ask the user to update the app. |
other 4xx |
Do not retry unchanged; fix the request or show the error. |