LimeLM
wyBuild
Support forum
wyDay blog
wyDay Home

limelm.pkey.generate

Generate product keys for a particular version.

Arguments

api_key (Required)
Your API application key. Your api key is available on your settings page.
version_id (Required)
The id of the version to create the product keys in. You can get the version ID by examining the URL in your browser. For instance, from the URL https://wyday.com/limelm/version/100/ you can see the version ID is 100. (Note: The Version ID is not the Version GUID).
num_keys (Optional)
The number of product keys to generate. If this is not set then the default value of 1 is used.
for_tfs (Optional)
Whether the product key(s) generated will be for TurboFloat Server or not. If this is set to true then the key(s) will be for TurboFloat Server (floating licensing). Otherwise the keys will be for TurboActivate (node-locked licensing). Possible values: true or false (default: false).
per_inst_leases (Optional)
If for_tfs is set to true, this parameter controls whether the leases issued by the TurboFloat Server instance are per-user session (when set to false) or per-instance of your app launched (when set to true). Possible values: true or false (default: false).
num_acts (Optional)
The number of activations the product keys will have if this is a TurboActivate key. Or if this is a TurboFloat Server key (i.e. "for_tfs" is set to "true") then this is the number of allowed concurrent connections to the floating license server. If this is not set then the default value of 1 is used.
deact_limit (Optional)
The number of deactivation that will be allowed on the product key (to move the product key, and your software, to other computers). Possible values:
  • -2: Inherit the default deactivation limit from the product version.
  • -1: Unlimited deactivations.
  • 0 through 9223372036854775807: Limited to the specified number of deactivations.
email (Optional)
An email to associate with the product keys.
feature_name[] (Optional)
One or more license fields to associate with the product keys.
feature_value[] (Optional)
The values to associate with the field names. The number of values must match the number of field names provided in the feature_name[] parameter. The format of the data must match the data type of the custom license fields. Invalid data will be molded to fit a "best guess" to match the data type. To avoid this "guessing" by LimeLM, supply data in the correct format (i.e. dates formatted correctly, donʼt supply text for "Integer" types, etc., etc.)
tag[] (Optional)
One or more tags to associate with the product keys.
uname_limit_name[] (Optional)
One or more usernames to limit the TurboFloat Server activated with this key to only allow requests from the specified usernames. Read more about named-user / per-seat licensing here.
uname_limit_platform[] (Optional)
The platforms that the usernames will be allowed on. The number of platforms must match the number of usernames provided in the uname_limit_name[] parameter.
  • 0: The username will work from any platform.
  • 1: The username will only work from Windows machines.
  • 2: The username will only work from macOS machines.
  • 3: The username will only work from Linux machines.
  • 4: The username will only work from BSD machines.
allow_vm (Optional)
Whether the product key(s) generated will be able to be activated on virtual machines / hypervisors. Possible values: yes, no, inherit. If for_tfs is true, the default for allow_vm is no. Otherwise the default is inherit, which inherits the value you set for your product version.
lc_allow_deact (Optional)
Set whether an end-user can deactivate their key via LicenseChest. Possible values:
  • inherit: Inherit the default deactivation setting from the product version. This is the default if this parameter is unset or set with an invalid value.
  • no: Disallow the customer from deactivating from within LicenseChest.
  • just-offline: Just allow offline deactivations (where they upload the offline deactivation request to LicenseChest and it processes it.
  • online-offline: Allow either offline deactivations (where an offline deactivation request must be submitted) or deactivation via the interface within LicenseChest (where the customer can just click a button with no proof needed).
lc_self_deact_limit (Optional)
If the "lc_allow_deact" parameter is anything other than "no", this set the number of deactivations the end-user is allowed to do themselves. Possible values:
  • inherit: Inherit the default self-deactivation limit from the product version.
  • 1 through 9223372036854775807: Limited to the specified number of deactivations.
lc_self_deact_limit_term (Optional)
The term-limit of the number of deactivations the end-user is allowed to do in their LicenseChest interface. Possible values:
  • no-term-limit: No term limit; just respect the lc_self_deact_limit as the hard limit. This is the default if this parameter is unset or set with an invalid value.
  • per-day: lc_self_deact_limit deactivations per day.
  • per-week: lc_self_deact_limit deactivations per week.
  • per-month: lc_self_deact_limit deactivations per month.
  • per-year: lc_self_deact_limit deactivations per year.
lc_allow_offline_act (Optional)
Whether to allow the customer to do their own offline activations. Possible values:
  • inherit: Inherit the default offline activation setting from the product version.
  • no: Disallow the customer from offline activation.
  • yes: Allow the customer to offline activate.
lc_view_extradata (Optional)
Whether the end-user will be able to view (in LicenseChest) any extra data you set when the customer activates your software. Possible values:
  • inherit: Inherit the default setting from the product version. This is the default if this parameter is unset or set with an invalid value.
  • yes: The customer will be able to see the extra data.
  • no: The customer will not be able to see the extra data.
lc_view_fields (Optional)
Whether the end-user will be able to view (in LicenseChest) any custom license fields. Possible values:
  • inherit: Inherit the default setting from the product version. This is the default if this parameter is unset or set with an invalid value.
  • no: End-users will not be able to see any custom license fields associated with their product key.
  • just-readable: End-users will be able to see any set custom license fields marked with the "readable in your app" parameter.
  • any: End-users will be able to see any and all set custom license fields for their product key.
lc_charge_htfs_to_comp (Optional)
Whether TurboFloat Server instances hosted on our infrastructure should be charged to your company or to the customer creating the TFS instance on our servers. If the customer installs and runs the TFS instance on their own device there is no charge to you nor to them. Also, thereʼs no charge for hosting TFS instances of a lease pool size of 1 on our infrastructure. Possible values:
  • inherit: Inherit the default setting from the product version. This is the default if this parameter is unset or set with an invalid value.
  • yes: The hosted TFS instance will be charged to your company.
  • no: The hosted TFS instance will be charged to the end-user.

Example Response

The method returns the list of generated product keys.

<pkeys total="2">
    <pkey id="103" key="A84U-ZTZT-V2WI-5KCK-EV5S-3PWK-K2TX"/>
    <pkey id="104" key="X8ZB-FRRK-PVWX-M3RY-YPE8-ARFM-N2TX"/>
</pkeys>

Error Codes

100: Invalid API Key
The API key passed was not valid or has expired.
101: Method "xxx" not found
The requested method was not found.
164: An API key must be used by X devices. Configurable in your settings.
You can only use an API key from X devices. You can set the exact number on your settings page. If you need to use the web API from multiple servers then create another user. You can also temporarily reset this message by logging into the account for which the API key is created and resetting the last used IP address on your settings page.
108: The version id is missing.
The version id was not specified.
109: The version doesnʼt exist or you donʼt have access to it.
Check to make sure you have access to the version id youʼve passed in.
110: You only have N activations left in your plan.
You have requested more activations than you have left in your plan. Upgrade your account for more activations.
111: You have no more activations left in your plan.
There are no more activations in your account. Upgrade your account for more activations.
113: You only have N serials left in your plan.
You have requested more serials than you have left in your plan. Upgrade your account for more serials. (Only applies to the Serial plan).
114: You have no more serials left in your plan.
There are no more serials in your account. Upgrade your account for more serials. (Only applies to the Serial plan).
116: There must be equal amount of features as feature values.
You have specified more feature_name[] values than feature_value[] values (or vice versa). There must be an equal number of feature_name[] as feature_value[].
117: You must enter a value for the feature "feature name". Itʼs a required feature.
Thereʼs a required feature that youʼve forgotten to set. Either set the feature or mark the feature as not required.
118: Your account is in dormant mode. Re-enable your account.
You cannot generate product keys when your account is in dormant mode. Re-enable your account and you will no longer get this error.
131: Tags must be less than 256 characters long.
You can only use tags that are less than 256 character long.
132: Tags cannot contain the * character. The "TAG_NAME" tag violates this rule.
Tags cannot contain the asterisk character.
142: Service currently unavailable
The requested service is temporarily unavailable.
148: You canʼt set empty tags.
Tags must consist of at least 1 character. Empty or null tags are rejected.