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 app.Ask the customer to check the key.
HWID_MISMATCHThe key is bound to another PC.Offer to move it (how).
DEVICE_LIMITThe key is already on all the PCs it allows.Same as above, or sell a key with more machines.
EXPIREDThe key's time is over.Point them to renew.
BANNEDYou banned the key.—
PAUSEDYou paused the key.—
MAINTENANCEThe app is in maintenance; the message is yours.Try again later.
MISSING_FIELDSThe request lacked the key or HWID.A 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.
In .NET every code is a constant on PwfErrorCodes, for example PwfErrorCodes.HwidMismatch.

Something missing or unclear? Tell us on Telegram.