Getting Started with LicenseChain

Get up and running with LicenseChain in minutes. This guide will help you set up your first license and start validating licenses in your application.

🚀 Quick Start

Prerequisites

Step 1: Choose Your SDK

Select the SDK for your programming language:

Node.js
npm install licensechain-node-sdk
Python
pip install licensechain-python-sdk
JavaScript
npm install licensechain-js-sdk
Go
go get github.com/licensechain/LicenseChain-Go-SDK
Ruby
gem install licensechain_ruby_sdk
Rust
cargo add licensechain

See our complete SDK list for all available languages.

Step 2: Get Your API Key

  1. Sign up at dashboard.licensechain.app
  2. Navigate to Settings → API Keys
  3. Create a new API key
  4. Copy and securely store your API key

Step 3: Initialize the SDK

Node.js Example

import LicenseChain from 'licensechain-node-sdk';

const client = new LicenseChain({
  apiKey: 'your-api-key-here',
  baseUrl: 'https://api.licensechain.app'
});

// Verify a license
try {
  const license = await client.licenses.verify('LICENSE-KEY-HERE');
  console.log('License status:', license.status);
  console.log('License valid:', license.isValid);
} catch (error) {
  console.error('License validation failed:', error.message);
}

Python Example

from licensechain import Client

client = Client(
    api_key='your-api-key-here',
    base_url='https://api.licensechain.app'
)

# Verify a license
try:
    license = client.licenses.verify('LICENSE-KEY-HERE')
    print(f'License status: {license.status}')
    print(f'License valid: {license.is_valid}')
except Exception as e:
    print(f'License validation failed: {e}')

Step 4: Create Your First License

Create a license through the dashboard:

  1. Log in to dashboard.licensechain.app
  2. Navigate to Licenses → Create New
  3. Fill in license details (app, plan, expiration, etc.)
  4. Generate the license key
  5. Copy the license key for use in your application

Step 5: Validate Licenses

Use the SDK to validate licenses in your application:

// Validate license on application startup
const isValid = await client.licenses.verify(userLicenseKey);

if (!isValid) {
  // Show error message
  console.error('Invalid license');
  return;
}

// Continue with application logic
console.log('License validated successfully');

📚 API Endpoints

All SDKs connect to the LicenseChain API at https://api.licensechain.app/v1. The SDKs automatically prepend the /v1 prefix to all endpoints.

Method Endpoint Description
GET /v1/health Health check endpoint
POST /v1/auth/login User authentication
POST /v1/auth/register User registration
GET /v1/apps List applications
POST /v1/apps Create application
GET /v1/licenses List licenses
POST /v1/licenses/verify Verify license key
GET /v1/webhooks List webhooks
POST /v1/webhooks Create webhook
GET /v1/analytics Get analytics data

✅ Next Steps