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
- An account at dashboard.licensechain.app
- An API key from your dashboard
- Your preferred programming language SDK installed
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
- Sign up at dashboard.licensechain.app
- Navigate to Settings → API Keys
- Create a new API key
- 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:
- Log in to dashboard.licensechain.app
- Navigate to Licenses → Create New
- Fill in license details (app, plan, expiration, etc.)
- Generate the license key
- 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
- Read the Licenses concept guide to understand license management
- Check out License Verification guide for best practices
- Explore the API Reference for detailed endpoint documentation
- Browse SDK documentation for language-specific guides