Getting started

Learn how to set up a product and a policy, plus create a new user and a license using Keygen's dashboard. If you need help after reading this, can reach out to us anytime at [email protected].

To get started, you will either need to log into your Dashboard or generate an authentication token via the API. To generate a token directly through the API, check out the code examples in the API reference, which includes examples in popular languages like Swift, C# and JavaScript.


Add your first product by going to the Products resource and clicking the New Product button. You will be presented with a form consisting of a few attributes for your product. If you're curious what a particular attribute is for, be sure to check out the Product resource in the API reference.

The product resource is used to segment policies and licenses (which we'll get into below) by product (in the case where you sell multiple products), allowing you to keep licenses and policies for multiple products organized. If you don't sell more than 1 product, this will be a one-time step.

View example of creating a product
Gif of creating a product resource


Next, we're going to add a license policy for your product. License policies define the different types of licenses that your product offers. Policies can be for a number of different things, from different tiers for your product (e.g. Basic vs Pro) to fine-grained feature policies.

To add a new policy, go to the Policies resource and click on the New Policy button. To figure out how to properly set up your policy, check out our guide on choosing a license model, where we go in-depth on a lot of popular licensing models and how to configure a policy to implement each one.

Can't figure out how to implement the licensing model you're looking for? Reach out and let us know, and we'll help answer any questions you have about implementation.

Curious about what each of the attributes are used for? Check out the Policy resource in API reference for all of the available options (there's a lot—we know).

View example of creating a policy
Gif of creating a policy resource


Add a new user to your Keygen account by going to the Users resource and clicking on the New User button. You will see all of your users under the users listing as well as all admin users. (Normally, you would create users through the API using a sign up form, but for the purpose of this guide we're creating them manually.)

Utilization of Keygen's user-account resources is completely optional—if you'd rather skip user-accounts and simply validate license keys and handle the rest server-side, feel free to do that. Our user resources are designed to help make client-side API integration easier, allowing your users to manage their own resources, while you respond to their actions via webhooks.

The user resource allows you to authenticate your users and interact with Keygen's API client-side. This is super useful if you'd prefer to allow your users the ability to manage their own licenses and machines, i.e. a self-serve licensing system.

View example of creating a user
Gif of creating a user resource

Please note that user resources are shared between products—meaning, when your account has multiple products, your users are signing up for a user account for all of your products, not just a single product. Your registration verbiage should reflect that. They will be able to login across all of your products with a single user account, but are licensed per-product.

For example, a user signs up for a "Blizzard" account, not for a "World of Warcraft" account. And with their "Blizzard" account, they will be able to login and buy licenses for "World of Warcraft", "Overwatch", "Starcraft", and for other products which "Blizzard" provides.


Next up, we're going to give the new user a license to use your product. To add a new license, go to the Licenses resource and click on the New License button. You will be presented with a form allowing you to select the policy to implement, as well as the user to create the license for.

The license resource is what you'd expect—licenses are used to grant access to your software. Each license resource will implement a policy, which will define the rules which that license must follow to remain valid. Each license can be associated with a user, but that's optional; this is useful when you're associating multiple licenses with a single user.

When creating a new license, you have the option to manually specify a license key. When the key field is left blank, a key will automatically be generated for you whenever the license is created.
View example of creating a license
Gif of creating a license resource

Next steps

That's it! Now that you've got a product all set up with a license policy, you're all set to start integrating Keygen into your product! We have a collection of examples on our GitHub, which covers:

Next up, you could…

  1. Learn how to validate licenses both server-side and client-side
  2. Create a registration form for your product to accept new users
  3. Create a login form in your product to authenticate your users
  4. Add a conditional feature within your product based on a user's licenses
  5. Start keeping track of each of your user's machines
  6. Integrate your payment provider and Keygen together using webhooks

Questions? Reach out at [email protected].