SKM.V3.MethodsVersion: 4.0.54. Both packages; all six documented target frameworks.
Result == ResultType.Success before using its data. In version 4.0.54, handled request and JSON errors normally return ResultType.Error with a diagnostic Message. A non-null result alone does not mean the request succeeded. See Request Errors.
Signed Activation Example
UseSKM.V3, SKM.V3.Methods and SKM.V3.Models (with using in C# or Imports in VB.NET). Replace the demonstration product ID 3349, license key and credential placeholders with your own values. The access token needs the Activate permission. This example checks the API result and signature; see the FAQ below for the other license checks.
Methods
Activate(string, ActivateModel)
Activates a license. Depending on the license settings, this can register a machine, start a trial, or acquire or renew a floating seat.
Returns:
KeyInfoResult. The API response. Check Result and Message before using the returned data.
Checks: The SDK does not verify the returned license signature in this call. Verify the response using the corresponding signature helper.
The access token needs the Activate permission. The SDK requests model version 3. When OSInfo is null, it attempts to collect OS information; use an empty string to prevent that automatic collection.
Activate(string, int, string, string, bool, int, int, string, string, string)
Activates a license. Depending on the license settings, this can register a machine, start a trial, or acquire or renew a floating seat.
Returns:
RawResponse. A signed RawResponse. Pass it to FromResponse(string, RawResponse) to verify and decode the license.
Checks: The SDK does not verify the returned license signature in this call. Verify the response using the corresponding signature helper.
This overload requests signing with SignMethod.StringSign and model version 3. The access token needs the Activate permission. metadata defaults to false; metadata is not verified by LicenseKey.FromResponse. An empty OSInfo prevents automatic OS information collection.
AddFeature(string, FeatureModel)
This method will change a given feature to be true (in a license). If the key algorithm in the product is SKGL, the key string will be changed if necessary. Otherwise, if SKM15 is used, the key will stay the same. If the key is changed, the new key will be stored in the message.
Returns:
BasicResult. The API response. Check Result and Message before using the returned data.
Handled client failures are returned as a non-null result with Error.
Always inspect Result before treating the response as successful.
BlockKey(string, KeyLockModel)
This method will block a specific license key to ensure that the key cannot be accessible by most of the methods in the Web API (activation, validation, optional field, and deactivation).Note, blocking the key will still allow you to access the key in Web API 3, unless otherwise stated for a given Web API 3 method. To do the reverse, please seeUnblockKey(string, KeyLockModel).
Returns:
BasicResult. The API response. Check Result and Message before using the returned data.
Handled client failures are returned as a non-null result with Error.
Always inspect Result before treating the response as successful.
ChangeCustomer(string, ChangeCustomerModel)
This method will change the customer associated with a license. If the customer is not specified (for example, if CustomerId=0) or the customer with the provided ID does not exist, any customer that was previously associated with the license will be dissociated.
Returns:
BasicResult. The API response. Check Result and Message before using the returned data.
ChangeNotes(string, ChangeNotesModel)
This method will change the content of the notes field of a given license key.
Returns:
BasicResult. The API response. Check Result and Message before using the returned data.
ChangeReseller(string, ChangeResellerModel)
This method will change the reseller of a license. If the reseller is not specified (for example, if ResellerId=0) or the reseller with the provided ID does not exist, any reseller that was previously associated with the license will be dissociated.
Returns:
BasicResult. The API response. Check Result and Message before using the returned data.
CreateKey(string, CreateKeyModel)
This method will create a new license key, which is the same as GenerateKey in Web API 2.
Returns:
CreateKeyResult. The API response. Check Result and Message before using the returned data.
Handled client failures are returned as a non-null result with Error.
Always inspect Result before treating the response as successful.
CreateTrialKey(string, CreateTrialKeyModel)
Creates a trial license for the supplied product and machine code.
Returns:
CreateKeyResult. The API response. Check Result and Message before using the returned data.
Deactivate(string, DeactivateModel)
Releases an activation for the supplied machine code.
Returns:
BasicResult. The API response. Check Result and Message before using the returned data.
The access token needs the Deactivate permission. One access token can have both Activate and Deactivate permissions. Set DeactivateModel.Floating=true when releasing a floating activation.
ExtendLicense(string, ExtendLicenseModel)
Extends the license using the period supplied in ExtendLicenseModel.
Returns:
BasicResult. The API response. Check Result and Message before using the returned data.
GetKey(string, KeyInfoModel)
Retrieves license information without registering a machine or renewing a floating seat.
Returns:
KeyInfoResult. The API response. Check Result and Message before using the returned data.
Checks: The SDK does not verify the returned license signature in this call.
The access token needs the GetKey permission. A successful lookup can return a blocked license. Check the fields your application relies on; retrieval success alone is not license validation.
GetKey(string, int, string, bool, string)
Retrieves license information without registering a machine or renewing a floating seat.
Returns:
RawResponse. A signed RawResponse. Use FromResponse(string, RawResponse) to verify and decode it.
Checks: The SDK does not verify the returned license signature in this call.
This overload requests Sign=true, SignMethod.StringSign and model version 3. It does not acquire or renew a floating seat.
MachineLockLimit(string, MachineLockLimit)
This method will change the maximum number of machine codes that a license key can have.
Returns:
BasicResult. The API response. Check Result and Message before using the returned data.
Handled client failures are returned as a non-null result with Error.
Always inspect Result before treating the response as successful.
RemoveFeature(string, FeatureModel)
Disables the selected feature, from F1 through F8, on a license.
Returns:
BasicResult. The API response. Check Result and Message before using the returned data.
UnblockKey(string, KeyLockModel)
This method will unblock a specific license key to ensure that the key can be accessible by most of the methods in the Web API (activation, validation, optional field, and deactivation). To do the reverse, please seeBlockKey(string, KeyLockModel).
Returns:
BasicResult. The API response. Check Result and Message before using the returned data.
Handled client failures are returned as a non-null result with Error.
Always inspect Result before treating the response as successful.
FAQ
Does Activate Verify the Signature Automatically?
Does Activate Verify the Signature Automatically?
No. Both
Activate overloads return the API response without verifying its signature. The overload returning RawResponse requests signing automatically; pass the response to LicenseKey.FromResponse with your RSA public key. With ActivateModel, set Sign=true and use the signature helpers on the returned LicenseKey.Verification of a signature is separate from your product, expiry, feature and machine checks. The Key Verification FAQ explains these checks.Can I Activate and Deactivate With the Same Access Token?
Can I Activate and Deactivate With the Same Access Token?
Yes. Give the access token both the Activate permission and the Deactivate permission. Activate alone does not grant Deactivate. For a floating seat, call Deactivate with the same process ID and
Floating=true. See Floating Licenses.Does GetKey Renew a Floating Seat?
Does GetKey Renew a Floating Seat?
No. Use Activate to acquire or renew a floating seat, reusing the same process ID. GetKey retrieves license information without renewing the seat.
maxOverdraft defaults to 0; set a positive value only when you want to allow extra seats. A failed renewal does not extend the last confirmed seat window.