Activate Bundle (Offline Method)

circle-info

Currently we support trial, perpetual and consumption license types for offline activation purposes.

Endpoint

  • Method: POST

  • Path: /api/v4/activate_bundle_offline

  • Description: Activates all licenses inside a bundle using the offline activation flow (base64 payload).

Authentication

See License API Authorization.

Required headers

  • Date (string) — RFC7231 GMT date string

  • Authorization (string) — signature or bearer token

  • Accept: application/json

Request

Body

The request body is a base64-encoded, stringified JSON object.

chevron-rightInteractive API referencehashtag

:::ApiMethodV2

:::

Schema

Request Body

The request body is a string representing a base64-encoded JSON object containing all the required activation data.

triangle-exclamation
chevron-rightRequest schema (TypeScript + JSON Schema)hashtag

TypeScript

JSON Schema

Signature

The signature value is constructed as follows:

1

Build the signing string — part 1

Start with the literal string: licenseSpring then a newline.

2

Build the signing string — part 2

Append: date: then a newline.

3

Build the signing string — part 3

Append either the license identifier (whichever is present for the request):

  • the "license_key" value, or

  • the "username" value then a newline.

4

Build the signing string — part 4

Append the "hardware_id" value, then a newline.

5

Build the signing string — part 5

Append the authorization identifier:

  • the "api_key" value (if using API key auth), or

  • the "client_id" value (if using OAuth) This completes the signing string.

6

Create HMAC

Encrypt the complete signing string using HMAC-SHA256 with the company signing key:

  • If using API key authorization: signing key = Shared Key

  • If using OAuth: signing key = Client Secret

Example (Node.js):

Finalized payload

This object is then stringified and encoded to base64.

Response Body

chevron-rightResponse schema (TypeScript + JSON Schema)hashtag

TypeScript

JSON Schema

Response Signature

The response objects two digital signatures which the client app can use to verify the authenticty of the response:

  1. license_signature is the HMAC-SHA256 signature explained in the Response Signature article.

  2. offline_signature is an additional HMAC-SHA256 signature specific to this endpoint. This value is constructed identically to the signature parameter in the request payload (see Signature above) using the date value received in the response.

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 in order to activate, check or deactivate the license (property license_key in the request body).

The license response object will contain the license_key property, and the property product_details.authorization_method will be the string license_key.

User-based product licenses

Each license assigned to the product has a corresponding "license user" instead of a license key. Requires username and password to be provided.

In the license response object, product_details.authorization_method will have the string value user and the response object will contain the user object with information on the license user.

License Types

The license_type property defines one of the 4 types of licenses based on their duration and how the license is used:

  • Perpetual: perpetual

  • Time-limited: time-limited

  • Subscription: subscription

  • Consumption: consumption

For more information see: License Types

Device variables

The optional variables parameter lets you set device variables during activation. For more information, see Device Variables.

Errors

If an error occurs, the response will have an HTTP status code of 400 or higher, and the response body will contain an error description in the following format:

JSON Schema

List of exceptions

missing_headers (400): some headers are missing

  • when missing authorization or date headers

missing_parameters (400): some parameters are missing in the request: different, parameters

  • when no request body at all or no file found in request body

authorization_missing_params (400): some parameters are missing in authorization: different, parameters

  • when has request body but request body is not properly base 64 encoded

  • when file is missing in request body

  • when license_key or hardware_id body parameters are missing

  • when data body parameter is missing

  • when api_key parameter is missing

product_not_bundle (400): Specified product "{CODE}" is not a bundle

circle-info

If you want to use this API endpoint directly, instead of using an SDK (which does most of the heavy lifting), contact us for additional instructions.

Guide on using Offline Licenses

If any aspect of the offline licensing model remains unclear or raises questions, we encourage you to explore our in-depth guide on linkarrow-up-right

This resource offers a comprehensive explanation of the offline licensing process, how it operates, and ways to utilize its advantages for your specific software applications.

Last updated

Was this helpful?