licensing 0.54. Reviewed source revision.
activate
Activate a license for a machine or process.Parameters
Result
Normally returns(license_key, message), where license_key is a LicenseKey object. With metadata=True, a successful license result has a third item: verified metadata as a dictionary, or the string Signature check for metadata object failed.. Failure results can still have only two items.
Returns (None, message) if the API rejects activation, the signature fails, or a handled request/parsing error occurs. An incorrectly formatted RSA public key can raise before these result checks.
Checks
Requests a signed ModelVersion 3 response and verifies the license signature withrsa_pub_key. With metadata=True, it also checks the metadata signature. It does not independently enforce your application’s product, features, expiry or machine-binding policy.
Web API reference.
Example
Replace the access token and RSA public key placeholders, product ID and example license key with your own values.example-device represents the identifier supplied by your application.
get_key
Retrieve license information without registering a device or renewing a floating seat.Parameters
Result
Returns(license_key, message). The parsed license is a LicenseKey object. Even with metadata=True, this method returns two items; it does not return a separately verified metadata dictionary.
Returns (None, message) on API rejection, a failed signature or a handled request/parsing error. A malformed RSA public key can raise an exception.
Checks
Requests a signed ModelVersion 3 response and verifies the license signature. A successful lookup can include a blocked license; checklicense_key.block. The method does not apply your application’s expiry policy or acquire a floating seat.
Web API reference.
create_trial_key
Create a trial key for the specified machine, or retrieve its previously created trial key.Parameters
Result
Returns(key_string, ''). The first item is the license-key string, not a LicenseKey object.
Returns (None, message) for API rejection or a handled request failure. Malformed response data can raise an exception.
Checks
The API applies its trial-key rules. This method does not activate the returned key or verify a signed license; activate it usingKey.activate.
Web API reference.
create_key
Create one or more licenses, optionally linked to a customer.Parameters
Result
Returns(response_dict, ''). The dictionary contains the API response fields, including the created key data.
Returns (None, message) for API rejection or a handled request failure. Malformed response data can raise an exception.
Checks
The API checks the access token’s permissions. This method does not verify a signed license response. Web API reference.deactivate
Release the activation identified by its machine code. Setfloating=True for a floating seat.
Parameters
Result
Returns(True, '') when deactivation succeeds.
Returns (False, message) for API rejection and (None, message) for a handled request failure. Malformed response data can raise an exception.
Checks
The API checks the access token’s permissions. This method does not verify a signed license response. Web API reference.extend_license
Adjust the license’s expiry date.Parameters
Result
Returns(True, message) on success; the message is the API’s message.
Returns (False, message) for API rejection and (None, message) for a handled request failure. Malformed response data can raise an exception.
Checks
The API checks the access token’s permissions. This method does not verify a signed license response. Web API reference.change_customer
Change the customer associated with a license.Parameters
Result
Returns(True, message) on success; the message is the API’s message.
Returns (False, message) for API rejection and (None, message) for a handled request failure. Malformed response data can raise an exception.
Checks
The API checks the access token’s permissions. This method does not verify a signed license response. Web API reference.unblock_key
Remove the blocked flag from a license.Parameters
Result
Returns(True, message) on success; the message is the API’s message.
Returns (False, message) for API rejection and (None, message) for a handled request failure. Malformed response data can raise an exception.
Checks
The API checks the access token’s permissions. This method does not verify a signed license response. Web API reference.block_key
Block a license.Parameters
Result
Returns(True, message) on success; the message is the API’s message.
Returns (False, message) for API rejection and (None, message) for a handled request failure. Malformed response data can raise an exception.
Checks
The API checks the access token’s permissions. This method does not verify a signed license response. Web API reference.machine_lock_limit
Set the license’s maximum number of machines.Parameters
Result
Returns(True, message) on success; the message is the API’s message.
Returns (False, message) for API rejection and (None, message) for a handled request failure. Malformed response data can raise an exception.
Checks
The API checks the access token’s permissions. This method does not verify a signed license response. Web API reference.change_notes
Replace a license’s notes.Parameters
Result
Returns(True, message) on success; the message is the API’s message.
Returns (False, message) for API rejection and (None, message) for a handled request failure. Malformed response data can raise an exception.
Checks
The API checks the access token’s permissions. This method does not verify a signed license response. Web API reference.change_reseller
Change the reseller associated with a license.Parameters
Result
Returns(True, message) on success; the message is the API’s message.
Returns (False, message) for API rejection and (None, message) for a handled request failure. Malformed response data can raise an exception.
Checks
The API checks the access token’s permissions. This method does not verify a signed license response. Web API reference.create_key_from_template
Create a license using a license template.Parameters
Result
Returns(key_string, raw_response, message) on success. These are the API’s key, rawResponse and message fields.
Failures have two items: (False, message) for API rejection or (None, message) for a handled request failure. Check the first item before unpacking the success tuple. Malformed response data can raise an exception.
Checks
The API checks the access token’s permissions. This method does not verify a signed license response. Web API reference.add_feature
Enable one of the eight feature flags.Parameters
Result
Returns(True, message) on success; the message is the API’s message.
Returns (False, message) for API rejection and (None, message) for a handled request failure. Malformed response data can raise an exception.
Checks
The API checks the access token’s permissions. This method does not verify a signed license response. Web API reference.remove_feature
Disable one of the eight feature flags.Parameters
Result
Returns(True, message) on success; the message is the API’s message.
Returns (False, message) for API rejection and (None, message) for a handled request failure. Malformed response data can raise an exception.
Checks
The API checks the access token’s permissions. This method does not verify a signed license response. Web API reference.FAQ
Can One Access Token Activate and Deactivate?
Can One Access Token Activate and Deactivate?
Yes. Select both the Activate permission and the Deactivate permission on the access token. The Activate permission alone does not grant deactivation. See the access-token guide.
Do I Need Another Signature Check After Activation?
Do I Need Another Signature Check After Activation?
No. A
LicenseKey returned by Key.activate has already passed the SDK’s signature check. Other checks depend on the application; see the license-check FAQ.How Do Floating Renewals Work?
How Do Floating Renewals Work?
Call
Key.activate with the same process identifier and floating interval for each renewal. Call Key.deactivate with the same identifier and floating=True when releasing it. Key.get_key does not renew the seat. See the floating guide for renewal timing and crash recovery.