Activate License (Online Method)
Endpoint
Method:
POSTPath:
/api/v4/activate_licenseDescription: 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)
Recommended headers
Accept: application/jsonContent-Type: application/json
Request
Body parameters
Required:
hardware_id(string) — Unique hardware ID generated for the client deviceproduct(string) — Product short code
One of (depending on product authorization method):
license_key(string) — Required for key-based productsusername+password(string) — Required for user-based productsid_token+customer_account_code(string) — Required for SSO Implicit grantcode+customer_account_code(string) — Required for SSO Authorization Code grant
Optional:
license_id(number) — Ensures the action affects only the license with this IDis_vm(boolean) — Set totrueif request is sent from a VMvm_info(string)os_ver(string)hostname(string)os_hostname(string)ip(string)ip_local(string)app_ver(string)sdk_ver(string)mac_address(string)variables(object) — Device variables as a JSON object
Minimal example (JSON)
Schema
Request Body
Response Body
Response schema (TypeScript + JSON Schema)
Full response schemas are shared across activation endpoints. See Activate License Offline Method for the complete response TypeScript shape.
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 & 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
Examples
Single-Sign-On License Activation
SSO setup and how to get the SSO URL: Single Sign On URL.
Use either id_token or code, not both at the same time.
Device Variables
The optional variables property lets you set device variables during activation. See Device Variables.
Last updated
Was this helpful?