While MC License is aimed at Minecraft plugin developers, we understand that there are other use cases for our service. These instructions show how to setup product licensing generically using MC License, which could be applied to any project, such as a Discord bot.

Integration

Your project can be supported exactly as normal by creating a plugin in the dashboard.

However, instead of using the library for Minecraft plugins, you should send your own request to the validation endpoint from your product (what the mcl-library does under the hood).

Our API publicly exposes this validation endpoint.

You need only make a GET request to this endpoint with the required information.

As shown in the spec, the pluginId and key are path parameters and must be provided, as these are the core of any product licensing system. There are two query parameters which must be provided, though you are not required to utilize them.

  • sessionId - This is used to power the server tracking feature. In a Minecraft plugin, the library sends off a random UUID representing the session, which periodically sends a heartbeat so that MC License can record active server analytics. This is useful for session-based systems.
  • nonce - This is a random UUID which should be generated per request. Since the response from the API is signed, through verifying the signature & nonce validation you can confirm the authenticity of the response. This is only necessary when your product is running on untrusted machines, as Minecraft plugins do by nature. Learn more.

The system has been designed so that, while MC License is designed for Minecraft plugins, it can be easily integrated into any other product.