← All posts

Bulk Generate License Keys with Asura's License Generator

Making licenses one at a time is fine for one customer. It gets slow when you need a batch for a design set. Asura's Generators tab lets you bulk-generate license keys: you set the key format once, choose how many keys you want, and create them all with one click. The keys also show up on the connected design set installation.

Why licenses created in the store show up on the design set site

In the previous tutorial we created one license by hand on the Design Set 1 installation. That license also appeared in the e-shop. This works because the e-shop connects to the design set site through an API with full permission. You can see it under the APIs tab as the "Design Set 1" key. The keys and secrets are masked there.

With that connection, anything you create under Licenses, Generators or APIs for that remote is mirrored on both sides. So you can manage everything from the store. This time we create the licenses from the e-shop, using a generator.

Create a generator

A generator is a saved license format. You define the format once, and every key it creates follows the same pattern.

  1. On the e-shop installation, go to Asura → Generators. Pick your design set in the Remote dropdown (here Design Set 1), then click Add New.
  2. Name: des-set-1.
  3. Character Map: the characters keys can be built from, e.g. asdfghjklqwertyuio1234.
  4. # of chunks: 10, and Chunk length: 9.
  5. Separator: -.
  6. Prefix: we used ds1- so you can tell at a glance which design set a key belongs to. There is also an optional Suffix field.
  7. Max Activation and Expire In (days) are optional. We left them empty.
  8. Terms: add the design sets this license unlocks. In the video these are Design Set 1 - Utility, Design Set 1 - Blog and Design Set 1 - Shop.
  9. Click Submit.

Generate licenses in bulk

  1. In the generators list, click Generate under your generator.
  2. Set Amount, for example 10.
  3. Tick Status: enable so the licenses can be used right away.
  4. Leave User empty if you have no customers yet. You can use Find User to give the batch to a customer.
  5. Click Submit.

You get 10 new licenses right away. Open Asura → Licenses on the Design Set 1 installation and the same licenses are already there. The generator also appears in that site's Generators tab, with its character map, separator and ds1- prefix.

We will use generators again when we install WooCommerce and Easy Digital Downloads. There, generators create the licenses for sold products.

Get Asura → dplugins.com