Skip to main content

JWT Token Issue Server

What is the JWT Token Issue Server?

axes4 provides several software components that can be licensed with a JWT token (e.g., axesSense On-Premise, axesFlip On-Premise, axesWord Headless, etc.).

If you are a software manufacturer with an OEM license from axes4, you will receive an API key for our licensing system where you can issue such JWT tokens yourself. In this case, axes4 does not require (and does not receive) access to the end customer's systems.

To create the JWT token, you need the System Identity of the executing machine. If you are using axesWord Headless or axesSlide Headless, you can determine the system identity yourself. For other products, please contact axes4.

OpenAPI documentation

Here you can find the OpenAPI documentation for our JWT Token Issue Server. Please use an online Open API editor to view it in a user-friendly format.

Code

Helper classes

public class IssueTokenRequest
{
    /// <summary>
    /// An opaque identifier provided by the partner to correlate end customers. This value must remain consistent for the same end customer across requests but does not need to convey any personal or identifying information. The API does not validate or interpret the value beyond using it for correlation.
    /// </summary>
    public string CustomerIdentifier { get; set; }

    /// <summary>
    /// "axesSense" | "axesFlip" | "axesWord" | "axesSlide"
    /// </summary>
    public string ProductEnum { get; set; }

    /// <summary>
    /// "1.2.3", "1-3.4-6.7-9" or "1.*.*"
    /// </summary>
    public string Version { get; set; }

    public DateTimeOffset StartDate { get; set; }
    public DateTimeOffset ExpireDate { get; set; }

    /// <summary>
    /// "Windows" | "Linux"
    /// </summary>
    public string OperatingSystemEnum { get; set; }

    /// <summary>
    /// Locking-Data (System Identity)
    /// </summary>
    public string LockingData { get; set; }
}

public class IssueTokenResponse
{
    public string Token { get; set; }
}

Get the License Token from our JWT Token Issue Server


using System.Net.Http;
using System.Net.Http.Json;
using System.Text.Json;

try
{
    var httpClient = new HttpClient
    {
        BaseAddress = new Uri("https://api.axes4.com")
    };

    httpClient.DefaultRequestHeaders.Add("x-api-key", "YourApiKey");

    var jsonOptions = new JsonSerializerOptions
    {
        PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
        PropertyNameCaseInsensitive = true
    };

    var request = new IssueTokenRequest
    {
        CustomerIdentifier = "YourCustomerIdentifier", // see OpenApi documentation
        ProductEnum = "axesWord", // see OpenApi documentation for valid values
        Version = "25.*.*",  // see OpenApi documentation
        StartDate = new DateTimeOffset(2025, 12, 1, 0, 0, 0, TimeSpan.Zero),
        ExpireDate = new DateTimeOffset(2025, 12, 30, 0, 0, 0, TimeSpan.Zero),
        OperatingSystemEnum = "Windows", // see OpenApi documentation for valid values
        LockingData = systemIdentity // The System Identity you received from axes4 or determined by code
    };

    using (var httpResponse = await httpClient.PostAsJsonAsync("jwtTokenIssuer/v1/token", request, jsonOptions))
    {
        if (!httpResponse.IsSuccessStatusCode)
        {
            var errorResponse = await httpResponse.Content.ReadAsStringAsync();
            // Analyze the error
            return;
        }

        var response = await httpResponse.Content.ReadFromJsonAsync<IssueTokenResponse>(jsonOptions);

        if (response?.Token != null)
        {
            var licenseToken = response.Token;
            // Save this token anywhere on the current machine or in your software
        }
        else
        {
            // No license token received.
        }
    }
}
catch (Exception e)
{
    // Analyze the exception
}