KeyAuth
Sign in

Error reference

Every failure carries a stable machine readable code. Match on the code, never on the message text.

Read them with client.error_code() and client.error_message(). Codes are part of the contract and will not change; messages are human copy and may be reworded.

Returned in plaintext

These are raised before the envelope can be decrypted, so they arrive unsigned. A correct client treats any unsigned response as a hard failure and never as success.

CodeMeaning and fix
UNKNOWN_APPThe application id does not exist. Re-download the SDK.
BAD_SIGNATUREThe secret does not match, or the envelope was edited in flight. Re-download the SDK rather than hand editing the config.
RATE_LIMITEDToo many requests from this IP. Back off; the response says for how long.
INVALID_ENVELOPEA field is missing or malformed. Almost always a bug in a hand written client.

Session and transport

CodeMeaning and fix
CLOCK_SKEWThe timestamp is outside the application tolerance. Sync the machine clock; do not widen the window as a workaround.
REPLAY_DETECTEDThat nonce was already used. Generate a fresh random nonce per request.
SESSION_EXPIREDThe session lapsed. Call init and login again.
NOT_AUTHENTICATEDThe action needs a logged in session. Call login first.
ALREADY_AUTHENTICATEDThis session already logged in. Use a new session.
INVALID_PAYLOADA field failed validation, for example a chunk index out of range.

Application state

CodeMeaning and fix
APP_DISABLEDYou disabled the application. Carries your status message.
APP_PAUSEDThe application is in maintenance.
VERSION_MISMATCHThe client version differs from the application version. Carries the update URL and message when set.

License

CodeMeaning and fix
INVALID_KEYNo such key for this application. Note that keys are per application.
KEY_BANNEDYou banned it. Carries the reason so support can explain it.
KEY_EXPIREDThe subscription elapsed.
KEY_REVOKEDPermanently withdrawn.
HWID_LIMITThe key is bound to its device limit. Reset devices on the key to rebind.
HWID_REQUIREDThe application enforces hardware locking but the client sent no hardware id.
MAX_USES_REACHEDThe login budget is exhausted.
CONCURRENT_SESSION_LIMITToo many live sessions for this key. Either the customer is sharing it or an old session has not expired.
LOGIN_THROTTLEDToo many failed logins from this IP for this application.

Self service hardware reset

CodeMeaning and fix
HWID_RESET_DISABLEDThe owner did not enable self service resets for this application.
HWID_RESET_COOLDOWNReset too soon. Carries retry_after in seconds and available_at.
HWID_RESET_LIMITThe key used its lifetime allowance. Only you can clear it now.
HWID_RESET_THROTTLEDToo many reset attempts from this IP.
HWID_RESET_WOULD_EXPIREThe time charged per reset exceeds what the key has left, so nothing was changed. Carries penalty and remaining in seconds.

HWID_LIMIT on login carries can_reset_hwid, so your client knows whether to offer a reset button before it asks the user to contact support.

Blacklist and files

CodeMeaning and fix
IP_BLACKLISTEDThe address is blocked for this application.
HWID_BLACKLISTEDThe device is blocked.
FILE_NOT_FOUNDNo enabled file with that JSON key in the active release, or the key level is below the release minimum. The two cases are deliberately not distinguished.
FILE_UNAVAILABLEServer side: the stored blob failed its integrity check or could not be read. Check the activity log for file.error and re-upload.
VAR_NOT_FOUNDNo enabled variable with that name at this key level.

Raised by the SDK itself

These never come from the server; the client produces them locally.

CodeMeaning and fix
NETWORK_ERRORWinHTTP could not reach the endpoint. Check DNS, firewall and TLS.
PROTOCOL_ERRORThe response was not a valid envelope, or metadata was missing. Often a proxy rewriting the body.
CRYPTO_ERRORA CNG call failed, or the response tag did not verify. Treat as an attack until proven otherwise.
FILE_CORRUPTA downloaded payload failed its size or SHA-256 check. The SDK clears the buffer rather than hand you bad bytes.
PIN_MISMATCHCertificate pinning is on and the server public key did not match.
NOT_CONFIGUREDThe config is missing an endpoint, application id or secret.

Do not show raw codes to your customers. Map them: KEY_EXPIRED becomes “your subscription ended”, while CRYPTO_ERROR and PROTOCOL_ERROR should just say something went wrong and be logged for you.