> 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/main-functions/validate-key/key-information.md).

# Key Information

The SDK provides methods to inspect remaining subscription durations, query license metadata, and determine if an authenticated key has lifetime status.

## Method Overview

```csharp
namespace qPapelEasyAuth
{
    public static class qPapelEasyAuth
    {
        // Query expiration date string returned from server
        public static string GetExpiryDate();

        // Calculate remaining active days as an integer (-1 for lifetime, 0 for expired)
        public static int GetRemainingDays();

        // Check whether the key possesses lifetime entitlement
        public static bool IsLifetime();
    }
}
```

## Usage Example

```csharp
using System;
using qPapelEasyAuth;

public class SubscriptionDashboard
{
    public static void DisplaySubscriptionDetails(string licenseKey, string apiKey)
    {
        var auth = qPapelEasyAuth.qPapelEasyAuth.Authenticate(licenseKey, apiKey);
        if (!auth.Success)
        {
            Console.WriteLine($"[-] Cannot load details: {auth.Message}");
            return;
        }

        string expiryDate = qPapelEasyAuth.qPapelEasyAuth.GetExpiryDate();
        int remainingDays = qPapelEasyAuth.qPapelEasyAuth.GetRemainingDays();
        bool isLifetime = qPapelEasyAuth.qPapelEasyAuth.IsLifetime();

        Console.WriteLine("--------------------------------------------");
        Console.WriteLine("          SUBSCRIPTION INFORMATION          ");
        Console.WriteLine("--------------------------------------------");
        Console.WriteLine($"License Key      : {licenseKey}");
        Console.WriteLine($"Account Status   : ACTIVE");
        
        if (isLifetime)
        {
            Console.WriteLine("Entitlement Type : LIFETIME ACCESS");
            Console.WriteLine("Expiration Date  : NEVER EXPIRES");
        }
        else
        {
            Console.WriteLine($"Expiration Date  : {expiryDate}");
            Console.WriteLine($"Remaining Days   : {remainingDays} day(s)");
        }
        Console.WriteLine("--------------------------------------------");
    }
}
```

## Behavior Reference

| Condition          | `GetRemainingDays()` | `IsLifetime()` | `GetExpiryDate()`       |
| ------------------ | -------------------- | -------------- | ----------------------- |
| **Lifetime Key**   | `-1`                 | `true`         | `""` or `"Lifetime"`    |
| **Active Key**     | `> 0` (e.g. `28`)    | `false`        | `"2026-10-19 14:30:00"` |
| **Expiring Today** | `0`                  | `false`        | `"2026-09-21 23:59:59"` |
| **Expired Key**    | `0` (or negative)    | `false`        | `"2026-09-20 12:00:00"` |

{% hint style="info" %}
Expiration dates are synchronized using the server's authoritative timestamp during handshake. Client-side local clock tampering has zero effect on entitlement calculations.
{% endhint %}
