Error codes

Every code the API answers with, and what to tell the customer

When something is refused, the reply carries an error_code for your code and a message written for the customer. Show the message; branch on the code. You can write most messages yourself, in any language, in Applications → Messages

Signing in

CodeMeansWhat to do
INVALID_KEYNo such key for this appAsk the customer to check the key
HWID_MISMATCHThe key is bound to another PCOffer to move it (how)
DEVICE_LIMITThe key is already on all the PCs it allowsSame as above, or sell a key with more machines
EXPIREDThe key's time is overPoint them to renew
BANNEDYou banned the key—
PAUSEDYou paused the key—
MAINTENANCEThe app is in maintenance; the message is yoursTry again later
BLOCKEDA rule of yours refused this address, machine, country, network or VPN (Rules); the message is yoursShow the message. A customer on a VPN can turn it off and try again
MISSING_FIELDSThe request lacked the key or HWIDA bug in the program

While running (SessionEnded)

CodeMeans
BANNED / PAUSED / EXPIREDThe key changed while the program was running
SESSION_EXPIREDThe session ended: you ended it in Sessions, its machine was reset, it signed in again elsewhere, or it timed out. The message says which
SESSION_REVOKEDThe key or account no longer exists
NETWORK_LOSTThree heartbeats in a row got no answer (set by the SDK)
CLOCK_SKEWThe PC's clock is far off and could not be corrected

Trials and HWID resets

CodeMeans
TRIAL_DISABLEDTrials are off for this app
TRIAL_USED / TRIAL_LIMITThis PC (or network) already had its trial
SELF_RESET_DISABLEDSelf-service moves are off; the customer has to ask you
RATE_LIMITEDMoved too recently; the message says how long to wait. Also sent (HTTP 429) when one network makes too many requests in a minute, or downloads an update too often. Running copies' check-ins have a much larger allowance, so many customers behind one address are fine
KEY_NOT_ACTIVEOnly an active key can be moved
NO_HWIDThe key is not bound to any PC: nothing to move

Add-ons

CodeMeans
ADDON_KEY_NOT_FOUNDNo add-on key like that in this app. It counts as a wrong key for the address
ADDON_KEY_USEDThe add-on key was already added, by this customer or another one
ADDON_UNAVAILABLEYou took the add-on off sale (App settings)

User variables

CodeMeans
INVALID_NAMEA variable name is letters, digits, "_", "." or "-", up to 64 characters (User variables)
VALUE_TOO_LONGA value is at most 4 KB
TOO_MANY_VARSThe customer already has 50 variables; delete one first
In .NET every code is a constant on PwfErrorCodes, for example PwfErrorCodes.HwidMismatch.

Something missing or unclear? Tell us on Telegram