SDKs
...
Getting Started
.NET/C# Management SDK

Management SDK Configuration and Usage

9min

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.

Configuration

To initialize the SDK, you must fill in your LicenseSpring Management API key. It can be found on your LicenseSpring account under Settings->Keys:

Document image


Note: API keys for licensing and management SDKs are different.

Copy this value and create the configuration as shown below:

C#


Now you can create ManagementService using this configuration object:

C#


Creating licenses

To create a key-based license you need to generate a license key:

C#


Then create a LicenseDetails object and set the necessary values:

C#


Now you can create an order:

C#


This method allows to specify order info such as customer:

C#


Managing orders

Use the returned order id to get order information and manage the order. For example, get licenses from the order:

C#


You can also append licenses to an existing order:

C#


Note: one order cannot contain key-based and user-based licenses. It contains licenses for one product.

User-based licenses

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.

C#


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:

C#