SKM.V3Version: 4.0.54. Both packages; all six documented target frameworks.
Properties
ActivatedMachines
Activated devices/machines that belong to this license key.List of ActivationData
AllowedMachines
Machine codes of those devices that will be prioritized during activation. Even if the limit is achieved, these will still be activated.string
Block
Whether this license is blocked. A successful GetKey response can contain a blocked license.bool
Created
The creation date of the license key.DateTime
Customer
The entire customer object assigned to this license key.Customer
DataObjects
A list of Data objects, additional variables associated with the license key.List of DataObject
Expires
The license expiry date. Enforce it according to your application’s licensing policy; API success alone does not check it.DateTime
F1
The feature 1 of the license key.bool
F2
The feature 2 of the license key.bool
F3
The feature 3 of the license key.bool
F4
The feature 4 of the license key.bool
F5
The feature 5 of the license key.bool
F6
The feature 6 of the license key.bool
F7
The feature 7 of the license key.bool
F8
The feature 8 of the license key.bool
GlobalId
A unique identifier of the license key. It can, for instance, be used as a “ReferencerId” when creating a data object(aka additional variables).long
ID
The ID (within the product) of the license key.int
Key
The license key string, eg. ABCDE-EFGHI-JKLMO-PQRST.string
MaxNoOfMachines
The maximum number of machines/devices that may activate this license. By setting this to 0, machine locking will be disabled and an unlimited number of devices will be able to activate the license.int
Notes
The notes field of the license key.string
Period
The duration of current license cycle eg. 30 days. Note, this is a static number and does not change automatically.int
ProductId
The ID of the product that this key belongs to.int
RawResponse
The original signed RawResponse, when the object was created from that format. SaveAsString preserves this response.RawResponse
Reseller
The reseller assigned to the license, when returned. FromResponse does not copy this field in 4.0.54.Reseller
SignDate
The signed response timestamp. Offline age checks use this time; saving the file again does not update it.DateTime
Signature
The signature used by the serialized-LicenseKey signing format. For objects created by FromResponse, the signature is held in RawResponse instead.string
TrialActivation
Tells if trial activation is enabled.bool
Constructors
LicenseKey()
Creates an empty LicenseKey object. This constructor does not send an API request.Methods
AddDataObject(string, DataObject)
Creates a newDataObject.
Returns:
long. Returns the id of the data object (and updates the DataObjects) if successful, or -1 otherwise.
Note: for more details, please see
AddDataObject
AddFeature(string, int)
Enables a numbered feature through the API and updates the matching local F1–F8 property.
Returns:
bool. True after a successful API result; false otherwise.
Failure Behavior: Throws ArgumentException when feature is outside 1 through 8.
The access token needs the AddFeature permission. Updating the object does not create a new signed response.
DaysLeft(bool)
Calculates the number of days until the license expiry date.
Returns:
int. Days until Expires, rounded upward. With zeroIfExpired=true, negative values are replaced by zero.
Checks: Uses DateTime.UtcNow; does not verify the signature or decide whether the application may run.
Equals(object)
Compares this object with another object using this type’s equality implementation.
Returns:
bool. True when the compared fields match; otherwise false. This is not a signature or license-validity check.
Checks: This comparison is not signature verification or license validation.
FromResponse(string, RawResponse)
Verifies and decodes a signed RawResponse.
Returns:
LicenseKey. A new LicenseKey with its RawResponse attached. Returns null for a null/error response or failed RSA signature verification.
Checks: Verifies the license payload signature using the supplied RSA public key. It does not enforce expiry, blocking, machine binding, features or cache age, and does not verify metadata.
Failure Behavior: Malformed Base64 or decoded license JSON can throw; those conversions are outside the signature-verification catch.
In 4.0.54, this conversion does not copy Reseller, ActivationData.FriendlyName or ActivationData.FloatingExpires into the parsed license. The original signed response remains in RawResponse.
Refresh(string)
Retrieves updated license data using GetKey and copies fields into this object.
Returns:
bool. True when GetKey succeeds and the fields are updated; false for a failed result.
Checks: Does not verify the new signature and does not renew a floating seat.
The access token needs the GetKey permission. The overload without sign requests signing only when the existing Signature string is non-empty. In 4.0.54, Refresh does not replace an attached RawResponse; load a freshly verified response instead when using that format.
Refresh(string, bool)
Retrieves updated license data using GetKey and copies fields into this object.
Returns:
bool. True when GetKey succeeds and the fields are updated; false for a failed result.
Checks: Does not verify the new signature and does not renew a floating seat.
The access token needs the GetKey permission. The overload without sign requests signing only when the existing Signature string is non-empty. In 4.0.54, Refresh does not replace an attached RawResponse; load a freshly verified response instead when using that format.
RemoveDataObject(string, int)
This method will remove an existing data object.
Returns:
bool. Returns true if successful or false otherwise.
Uses the RemoveDataObject API for this license. The access token needs the RemoveDataObject permission; a successful call also updates the local DataObjects list.
FAQ
Why Are Some Fields Missing After FromResponse?
Why Are Some Fields Missing After FromResponse?
In 4.0.54,
FromResponse does not copy Reseller, ActivatedMachines[].FriendlyName or ActivatedMachines[].FloatingExpires into the resulting object. The original response remains in RawResponse. Do not assume these fields are absent on the server because the converted object has no value.Can I Refresh a License and Then Save It?
Can I Refresh a License and Then Save It?
Be careful with objects created by
FromResponse: Refresh changes the object’s fields but does not replace its stored RawResponse. SaveAsString prefers that stored response, so it can save the older data. Retrieve a new signed response, verify it and save the newly returned object instead.