Need to give away a free license for a commercial plugin in the Craft CMS Plugin Store? There is no GUI at id.craftcms.com to do this, so use the Craftnet API to easily generate license keys without a purchase.
We developed Link Vault for Craft 3 and had been using it on projects for a few months before it was approved and accepted into the Craft Plugin store as a commercial plugin.
Plugins that are in the Craft Plugin Store communicate with sites on which they’re installed, so now that Link Vault was in this official plugin list (and commercial), we were presented with license key “nag notices” in our Craft control panels.
We needed to be able to gift ourselves a few licenses to cover the sites it was in use on (we could just pay ourselves, but that feels a little Inception-y, and I don’t want to rip a hole in the space-time continuum). Further, we will want to grandfather in all the users who had bought Link Vault for Craft 2 and may want to upgrade those sites. There is currently no way to do this when logged into id.craftcms.com, so you have to use the Craftnet API to create a plugin license, which is easy to do.
To generate a license key without requiring a purchase, you need your Craft ID username, and an API token from your account. Under Developer Settings, click “Generate New API Token” and copy that somewhere, because when you return to the page, it will be all asterisks.
With those two pieces of information, you have enough to generate a license key. Assuming my login is masugadesign and my API Token is uurzawyghj3ebb7mp8r762h7dn8htstx8xsl7ou7, I would open a terminal window and enter:
If you (or the person to whom you assigned the license) look under Plugins in your Craft ID account, you will see the new license there, under Licenses > Plugins.
Enter the full license key in your Craft control panel, and the green check-mark will indicate that you're all set.
Alternatives
Just yesterday, Studio Espresso released Craftnet CP plugin for Craft CMS 3.x, which is a Craft plugin that allows you to "Generate one or more licenses for a plugin." You could try this as well, but note that the author says "Note that I made this mostly for myself and that future development will take place if and when I need it. Issues and PR's will be handled on a best-effort basis."
Update: Fred Carlsen of Superbig pointed out that he also has a plugin called Craftnet CLI, which should make this process a bit nicer via the command line.
We’ve discontinued CP Filters for Craft CMS 5. Lab Reports and Link Vault will be updated. We still use Craft, and want to focus on creating great websites for our clients.
Shopify's Dawn theme homepage may get an SEO warning for an empty h1 header element. This is a missed opportunity to help search engines understand what your page is about. Small edits to the theme code can fix this technical SEO issue.
Shopify's default Dawn theme displays empty alt tags for collection images. This post explains how to fix blank alt tags for Shopify collection images to improve your Shopify store's accessibility and SEO.
Subscribe to Our Newsletter
A few times a year we send out a newsletter with tips and info related to web design, SEO, and things you may find interesting.