> For the complete documentation index, see [llms.txt](https://easyauth.papelship.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://easyauth.papelship.com/csharp-document/important-error-codes.md).

# Important Error Codes

This reference document outlines the standard error codes returned by the EasyAuth authentication server and native client core during session initialization, key validation, and asset delivery.

## Authentication & License Error Codes

| Error Code | Error Name           | Cause                                                                    | Resolution                                         |
| ---------- | -------------------- | ------------------------------------------------------------------------ | -------------------------------------------------- |
| `1001`     | `KEY_NOT_FOUND`      | The entered license key does not exist in the database.                  | Verify the key format and spelling with the user.  |
| `1002`     | `KEY_EXPIRED`        | The subscription duration has lapsed.                                    | Prompt the user to renew their subscription.       |
| `1003`     | `HWID_MISMATCH`      | The key is bound to a different computer HWID.                           | Reset the HWID from the admin panel if authorized. |
| `1004`     | `KEY_BANNED`         | The key has been flagged and banned by an administrator or AI detection. | Review security logs in the panel for ban reason.  |
| `1005`     | `MAX_USERS_EXCEEDED` | All concurrent seats for this key are currently active.                  | Close other active sessions or upgrade key seats.  |
| `1006`     | `KEY_PAUSED`         | The license is temporarily suspended by admin.                           | Resume the key from the web management dashboard.  |
| `1007`     | `INVALID_PRODUCT`    | The key belongs to another product catalog.                              | Verify product API key (`pk_...`) in client code.  |

## Session & Network Error Codes

| Error Code | Error Name         | Cause                                                  | Resolution                                             |
| ---------- | ------------------ | ------------------------------------------------------ | ------------------------------------------------------ |
| `2001`     | `SERVER_OFFLINE`   | Client cannot establish TCP connection to server port. | Verify server IP, port forwarding, and firewall rules. |
| `2002`     | `HANDSHAKE_FAILED` | Cryptographic session negotiation failed.              | Ensure client and server SDK versions match.           |
| `2003`     | `PACKET_TAMPERED`  | Packet integrity check failed.                         | Network packet was modified or intercepted in transit. |
| `2004`     | `SESSION_EXPIRED`  | Inactivity timeout or missing heartbeat signals.       | Re-initialize session using `InitSession()`.           |
| `2005`     | `RATE_LIMITED`     | Too many requests in a short time window.              | Add back-off retry intervals before retrying.          |

## Anti-Tamper & Security Error Codes

| Error Code | Error Name          | Cause                                              | Resolution                                           |
| ---------- | ------------------- | -------------------------------------------------- | ---------------------------------------------------- |
| `3001`     | `DEBUGGER_DETECTED` | Hardware or software debugger attached to process. | Close x64dbg, IDA Pro, Visual Studio debugger.       |
| `3002`     | `MEMORY_TAMPERED`   | CRC32 code section checksum mismatch.              | Check for third-party overlays or memory injectors.  |
| `3003`     | `HOOK_DETECTED`     | System API inline hook detected on critical DLL.   | Remove antivirus or proxy hooking tools.             |
| `3004`     | `VM_BLOCKED`        | Application policy forbids execution inside VMs.   | Run on physical bare-metal hardware.                 |
| `3005`     | `TIME_TAMPERED`     | Local system clock rolled backwards.               | Synchronize Windows system clock with internet time. |

## Handling Errors in C\#

```csharp
var authResult = qPapelEasyAuth.qPapelEasyAuth.Authenticate(licenseKey, apiKey);

if (!authResult.Success)
{
    Console.WriteLine($"Error [{authResult.ErrorCode}] ({authResult.ErrorName}): {authResult.Message}");
    
    if (authResult.ErrorCode == 1003)
    {
        // Handle HWID mismatch flow
        ShowHwidResetDialog();
    }
    else if (authResult.ErrorCode == 1002)
    {
        // Handle renewal flow
        OpenRenewalWebPage();
    }
}
```

{% hint style="info" %}
All error messages returned by `EasyAuthResult.Message` are safe for direct display in user-facing UI dialogs.
{% endhint %}
