website logo
⌘K
Getting Started
Introduction
Basic Concepts
Opening an Account
Creating & Configuring Products
Integrating SDK and Configuring License Fulfillment
Activate a Key-Based License
Vendor Platform
Issuing New Licenses
License Detail View
Order Detail View
Customer Detail View
Metadata
Analytics
Settings
Product Configuration
Product Features
Product Custom Fields
Product Versioning
License Policies
Product Bundles
License Entitlements
License Types
Activations & Device Transfers
Features
Custom Fields
License Start Date
License Note
Maintenance Period
Trial Licenses
Floating Licenses
License Activation Types
Portals
End-User Portal
Offline Portal
Air-Gapped Portal
License API
License API Authorization
License Activation/Deactivation
License Check
Consumption
Floating
Trial Key
Product Details
Device Variables
Changing Password
Management API
Making API Requests
Management API Authorization
Customer
Product
Order
License
Device
Analytics
SDKs
Tutorials
.NET/C# SDK
.NET/C# Management SDK
C++ SDK
Java SDK
Python SDK
Go SDK
Delphi SDK
Swift/Objective-C SDK
Android SDK
Unity SDK
Errors and Response Codes
Floating Server
API Reference
Deployment
Configuration
Floating Server UI
Securing the Server
Whitelabeling
FAQ
Floating Server Changelog
Integrations
Salesforce
FastSpring
Stripe
Shopify
Common Scenarios
Single Sign On (SSO)
Glossary
General
SDK Glossary
Vendor Platform
Product Configuration Glossary
License Configuration
Postman Collections
Frequently Asked Questions
Changelog
License API changelog
Platform changelog
Docs powered by
Archbee
SDKs
...
Licensing Scenarios
License Type Options

License Data

19min

Whether you are a developer seeking to integrate licensing features into your product or a system administrator responsible for overseeing licenses, understanding how to access license data is crucial for effective licensing management.

In LicenceSpring, licenses are equipped with numerous fields, encompassing essential information such as status, maintenance period, start date, and more.

In this tutorial, we will delve into the process of accessing these fields and comprehending their significance.

Prerequisites

  1. Completed the Getting Started Tutorial, specifically:
    • Initialized LicenseManager (or LicenseHandler) with your configuration using the appropriate settings.
    • Created a LicenseID using either LicenseID::fromKey or LicenseID::fromUser function, depending on the activation method you prefer.
    • Activated a license of any type.

License ID

LicenseID is a fundamental component of LicenceSpring's licensing infrastructure, serving as a crucial license identifier object.

It acts as a unique and immutable identifier assigned to each individual license within the system.

LicenseID can be accessed using the following getters on the License object:

C++
C#
Swift
|
// key-based:
license.licenseKey

// user-based:
license.user


License Status

License status is a critical attribute within LicenceSpring's licensing framework, representing the current state of a license.

As a string value, it can take on four distinct values: 'Active', 'Disabled', 'Expired', or 'Inactive'.

Developers can access license status in the SDKs through:

C++
C#
Swift
|
license.state


For more information about the different statuses, see License Types.

You can also check for active, valid, enabled, and expired licenses using isActive, isValid, isEnabled, and isExpired methods respectively.

Maintenance Period

A maintenance period refers to a specific duration during which software vendors or service providers offer ongoing support, updates, and access to new versions or features for their products or services.

See Maintenance Period for more information about implementing a maintenance period.

Developers have multiple fields to utilize when it comes to maintenance periods, starting with the getter for license maintenance period in local time or UTC. These are shown below:

C++
C#
Swift
|
license.maintenancePeriod


It is also possible to check if the maintenance period is expired, using the Boolean checker:

C++
C#
Swift
|
license.isMaintenancePeriodExpired


Finally, the LicenseSpring SDKs offer the ability to return the number of days remaining until the end of the maintenace period:

C++
C#
|
int LicenseSpring.License.MaintenanceDaysRemaining()


Start Date

Licenses have an optional start date field, defining the first activation date for added flexibility.

This allows customers to activate licenses when needed, aligning with specific timelines and project requirements.

It also enables software vendors to generate pre-sales and plan product launches efficiently.

The start date of a license can be accessed by using:

C++
C#
Swift
|
license.startDate // Date?


CannotBeActivatedNowException will be thrown if start date field is set for the license and current date is behind start date.

Last Check:

The license last check date in local time is provided as a time structure, indicating the most recent date and time when the license was last checked on the user's system, adjusted to either the local time zone or UTC.

These getters for the date and time of the last check are:

C++
C#
Swift
|
license.lastSyncDate


It is also possible to retrieve the number of days since the last check:

C++
C#
|
int LicenseSpring::License::daysPassedSinceLastCheck()	


Activation Count:

Tracking current activations and maximum activations is vital for effective license management.

The current activations offer real-time insights into usage trends, aiding vendors in decision-making, while the maximum activations set crucial limits, preventing unauthorized use and ensuring compliance. The getters used to access these values are shown below:

C++
C#
Swift
|
license.timesActivated
license.maxActivations


This data empowers both vendors and users to optimize resource allocation and maintain a harmonious licensing ecosystem.

LicenseNoAvailableActivationsException thrown when license has already been activated maximum number of times.

License Transfers

License transfer refers to the process of moving a software license from one device to another.

In such cases, the activation of the license on the new device is counted as an activation event.

This means that when a license is transferred to a different device, it is considered as if it were newly activated on that device.

Developers can access the current transfer count of a license by using:

C++
C#
Swift
|
license.transferCount


License Owner

The license owner refers to the individual or organization associated with a specific software license.

This information provides essential details about the entity that holds the rights and permissions to use the licensed product or service.

The license owner can be retrieved through the SDK with:

C++
C#
Swift
|
license.customer // Customer




Updated 05 Sep 2023
Did this page help you?
PREVIOUS
License Type Options
NEXT
Consumption-Based
Docs powered by
Archbee
TABLE OF CONTENTS
Prerequisites
License ID
License Status
Maintenance Period
Start Date
Last Check:
Activation Count:
License Transfers
License Owner
Docs powered by
Archbee