For the complete documentation index, see llms.txt. This page is also available as Markdown.

Activate License (Online Method)

Endpoint

  • Method: POST

  • Path: /api/v4/activate_license

  • Description: Activates a license for a device and returns the license payload.

Authentication

These requests are authenticated and signed. See License API Authorization.

Required headers

  • Date (string) — RFC7231 GMT date string (example: Thu, 17 Nov 2022 20:51:35 GMT)

  • Authorization (string) — signature or bearer token (depending on auth method)

Optional headers

  • licensespring-tpm-signature (string) — TPM licensing signature and algorithm

    • licensespring-tpm-signature: algorithm="ES256",signature=""

  • Accept: application/json

  • Content-Type: application/json

Request

Body parameters

Required:

  • hardware_id (string) — Unique hardware ID generated for the client device

  • product (string) — Product short code

One of (depending on product authorization method):

  • license_key (string) — Required for key-based products

  • username + password (string) — Required for user-based products

  • id_token (use access_token value) + customer_account_code (string) — Required for SSO Implicit grant

  • code + customer_account_code (string) — Required for SSO Authorization Code grant

Optional:

  • license_id (number) — Ensures the action affects only the license with this ID

  • app_ver (string)

  • app_name (string)

  • sdk_ver (string)

  • variables (object) — Device variables as a JSON object

  • redirect_uri (string)

  • bundle_code (string)

  • include_metadata_string (boolean)

  • tpm_enrollment (object) — Signing public key for TPM licensing

  • include_scheduled_changes (boolean)

Minimal example (JSON)


Schema

Request Body

Request schema (TypeScript + JSON Schema)

TypeScript

JSON Schema


Response Body

Response schema (TypeScript + JSON Schema)

TypeScript

JSON Schema

Response objects contain a license_signature value which the client app can use to verify authenticity (see Response Signature).


License Authorization Method

There are two types of product licenses based on how the client application authorizes itself to interact with a license:

Key-based product licenses

Each license assigned to the product requires the client to provide a license key (license_key) in order to activate, check or deactivate the license. The response will contain license_key and product_details.authorization_method will be "license-key".

User-based product licenses

Each license has a corresponding "license user" instead of a license key. Ways to access:

  • username & password

  • id_token (use access_token value) & customer_account_code (SSO Implicit grant)

  • code & customer_account_code (SSO Authorization code grant)

In the response, product_details.authorization_method will be "user" and the response will contain a user object.


License Types

license_type property values:

  • Perpetual: perpetual

  • Time-limited: time-limited

  • Subscription: subscription

  • Consumption: consumption

See: License Types


Errors

If an error occurs, HTTP status will be 400 or higher and the response body will have:

JSON Schema

List of exceptions:

unknown_product (400): Provided product was not found

license_not_found (400): License with the provided license user not found

license_not_enabled (400): The license is not enabled

vm_not_allowed (400): Virtual machine not allowed

offline_floating_cloud_not_supported (400): Floating cloud licenses cannot be activated offline

license_start_date_error (400): This license cannot be activated before start date: {date}

blacklisted (400): This device is blacklisted

license_activated_max_times (400): This license key has already been activated the maximum number of times

license_user_activated_max_times (400): License user has activated this license max times

license_expired (400): License validity period has expired

license_transferred_max_times (400): This license has already been transferred the maximum number of times

license_device_exists (409): A device matching this hardware_id is already created on the license.

product_version_not_supported (400): License product version does not support the app_ver sent in the request

tpm_not_enabled (400): This license doesn't have TPM licensing enabled, and tpm_enrollment is being sent in the request

tpm_enrollment_required (400): This license has TPM licensing enabled, but tpm_enrollment is not being sent in the request

tpm_invalid_public_key (400): The TPM public key sent is not valid

tpm_signature_required (400): The TPM signature is missing from the header and TPM usage is enforced

tpm_signature_missmatch (400): The TPM signature/algorithm is not ES256 and the signature can't be verified against the TPM public key


Examples

Single-Sign-On License Activation

SSO setup and how to get the SSO URL: Single Sign On URL.


Device Variables

The optional variables property lets you set device variables during activation. See Device Variables.

Last updated

Was this helpful?