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
| Code | Means | What to do |
|---|---|---|
INVALID_KEY | No such key for this app. | Ask the customer to check the key. |
HWID_MISMATCH | The key is bound to another PC. | Offer to move it (how). |
DEVICE_LIMIT | The key is already on all the PCs it allows. | Same as above, or sell a key with more machines. |
EXPIRED | The key's time is over. | Point them to renew. |
BANNED | You banned the key. | — |
PAUSED | You paused the key. | — |
MAINTENANCE | The app is in maintenance; the message is yours. | Try again later. |
MISSING_FIELDS | The request lacked the key or HWID. | A bug in the program. |
While running (SessionEnded)
| Code | Means |
|---|---|
BANNED / PAUSED / EXPIRED | The key changed while the program was running. |
SESSION_EXPIRED | The 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_REVOKED | The key or account no longer exists. |
NETWORK_LOST | Three heartbeats in a row got no answer (set by the SDK). |
CLOCK_SKEW | The PC's clock is far off and could not be corrected. |
Trials and HWID resets
| Code | Means |
|---|---|
TRIAL_DISABLED | Trials are off for this app. |
TRIAL_USED / TRIAL_LIMIT | This PC (or network) already had its trial. |
SELF_RESET_DISABLED | Self-service moves are off; the customer has to ask you. |
RATE_LIMITED | Moved 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_ACTIVE | Only an active key can be moved. |
NO_HWID | The 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.