Deactivate License (Offline Method)

circle-info

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

Endpoint

  • Method: POST

  • Path: /api/v4/deactivate_offline

  • Description: Deactivates a license using the offline 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 (see schema below).

triangle-exclamation

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 from a specific signing string and then encrypted using HMAC-SHA256 with the company shared key (or client secret for OAuth). Use the following steps to build the signing string:

1

Step

Concatenate the string "licenseSpring" plus a newline.

2

Step

Add the string "date: " plus the "date" value from the license payload object, plus a newline.

3

Step

Add either the "license_key" or "username" value from the request payload (whichever is present), plus a newline.

4

Step

Add the "hardware_id" value from the request payload, plus a newline.

5

Step

Add the "api_key" value from the request payload.

Encrypt the complete string with HMAC-SHA256 using the signing key (Shared Key for API key authorization; Client Secret for OAuth). Example in Node.js:


Finalized payload

This object is then stringified and encoded to base64.


Response Body

If the request succeeds, the endpoint responds with HTTP 200 and the string:

license_deactivated


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

  • Client provides property license_key in the request body.

  • The license response object will contain license_key.

  • product_details.authorization_method will be "license_key".

User-based product licenses

  • Product uses a license user instead of a license key.

  • Access methods include:

    • Providing username and password

    • Providing id_token and customer_account_code (Implicit grant SSO)

    • Providing code and customer_account_code (Authorization code grant SSO)

In responses, product_details.authorization_method will be "user" and the response will contain the user object with information on the license user.


Errors

If an error occurs, the response will have HTTP status code >= 400 and the body will contain an error description:

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

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

authorization_missing_params (400): some parameters are missing in authorization

  • when the request body is not properly base64 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


Guide on using Offline Licenses

If any aspect of the offline licensing model remains unclear, see Offline License Activation.

Last updated

Was this helpful?