Management SDK Configuration and Usage
This guide is designed to help you configure your application and start using LicenseSpring Management SDK functionality.
As you navigate through this tutorial, you'll acquire the knowledge to issue licenses and manage orders within your .NET application.
To initialize the SDK, you must fill in your LicenseSpring Management API key. It can be found on your LicenseSpring account under Settings->Keys:
Note: API keys for licensing and management SDKs are different.
Copy this value and create the configuration as shown below:
Now you can create ManagementService using this configuration object:
To create a key-based license you need to generate a license key:
Then create a LicenseDetails object and set the necessary values:
Now you can create an order:
This method allows to specify order info such as customer:
Use the returned order id to get order information and manage the order. For example, get licenses from the order:
You can also append licenses to an existing order:
Note: one order cannot contain key-based and user-based licenses. It contains licenses for one product.
The process of creating a user-based license is almost the same. However, you do not need to generate keys. Also, ensure that the specified product is user-based.
To assign a user to the created license, retrieve the license using the order ID as shown above and assign the user by license ID: