Getting Started

Learn how to configure your Keymint account, install the official SDKs, and activate your first license key.

This guide walks you through the steps to set up your Keymint workspace, install our SDKs, and execute a node-locked license activation. By the end of this tutorial, you will be able to verify seat permissions programmatically on a target machine.

Step 1: Retrieve your API Credentials

To authenticate requests to the Keymint API, you need a secret API key.

  1. Sign in to the Keymint Dashboard.
  2. Navigate to Developer Settings > API Keys.
  3. Create a new API key with the client scope and copy the token.

Keep your API key secure. Do not commit it to public version control or expose it in frontend client-side bundles.

Step 2: Install the Client Library

Install the client SDK for your preferred environment. We provide native libraries for Node.js/TypeScript, Go, Python, and C#.

npm install keymint

Step 3: Run your First Activation

Initialize the client with your API key, then invoke the activation endpoint. This registers the host machine under the license key and checks for seat availability.

import { KeyMint } from 'keymint';

// Initialize the Keymint client
const keymint = new KeyMint('YOUR_API_KEY');

async function runActivation() {
  try {
    const response = await keymint.activateKey({
      productId: 'prod_Nx8K2mLpQ4rVtW9sBc',
      licenseKey: 'A8E2K-9F1BC-3D4GH-7J2KM',
      hostId: 'mac-studio-m2' // Unique identifier for the host machine
    });

    if (response.code === 0) {
      console.log(`License validated. Seat active for ${response.licenseeName}`);
    } else {
      console.log(`Activation failed: ${response.message}`);
    }
  } catch (error) {
    console.error('API request failed:', error.message);
  }
}

runActivation();

Optional: Claim Anonymous Buyers During Activation

If you sell a key before collecting customer details, your app can ask for name and email during activation and pass them as licensee:

json
{
  "productId": "prod_Nx8K2mLpQ4rVtW9sBc",
  "licenseKey": "A8E2K-9F1BC-3D4GH-7J2KM",
  "hostId": "mac-studio-m2",
  "licensee": {
    "name": "Jane Doe",
    "email": "jane@example.com"
  }
}

This only assigns the license being activated. Client keys cannot pass arbitrary customerId values or manage customers directly.

Next Steps