API Client Usage Examples

Set app version

import licensespring

licensespring.app_version = "MyApp 1.0.0"

Create APIClient

An API client can use either API keys (shared_key and api_key) or OAuth (client_id and client_secret) for authorization.

from licensespring.api import APIClient

api_client = APIClient(api_key="_your_api_key_", shared_key="_your_shared_key_")

Activate key based license

product = "lkprod1"
license_key = "GPB7-279T-6MNK-CQLK"
license_data = api_client.activate_license(product=product, license_key=license_key)

print(license_data)

Activate user based license

product = "uprod1"
username = "[email protected]"
password = "nq64k1!@"

license_data = api_client.activate_license(
    product=product, username=username, password=password
)

print(license_data)

Deactivate key based license

Deactivate user based license

Activate key based bundle

Activate user based bundle

Deactivate key based bundle

Deactivate user based bundle

Check key based bundle

Check user based bundle

Check key based license

Check user based license

Add consumption

Add feature consumption

Trial key

Product details

Track device variables

Get device variables

Floating borrow

Floating release

Change password

Versions

Installation file

Customer license users

SSO URL

SSO URL with code response type

Activate offline

Activate offline load

Deactivate offline

Key based license feature check

Key based license floating feature release

Was this helpful?