Quick Start Guide

Get up and running with Slice License as a Service in just 5 minutes.

What You'll Learn

This guide will walk you through the essential steps to start using Slice

  • Create an account and get your API key
  • Set up your first product and plan
  • Create a license and assign it to a user
  • Validate a license using the API
1

Create an Account

Sign up and get your API key

First, you'll need to create a tenant account. This gives you access to the Slice dashboard where you can manage your products, plans, and licenses.

Steps:

  1. Go to the signup page
  2. Enter your business name, email, and password
  3. Verify your email address
  4. Log in to your dashboard

Tip: After signing up, you'll need to verify your email before you can access all features. Check your inbox for the verification code.

2

Get Your API Key

Generate an API key for authentication

API keys are used to authenticate your requests to the Slice API. You'll need one to make API calls from your application.

Steps:

  1. Navigate to API Keys in your dashboard
  2. Click "Create API Key"
  3. Give your key a name (e.g., "Production Key" or "Development Key")
  4. Copy the API key immediately - you won't be able to see it again!
  5. Store it securely in your environment variables

Security Warning: API keys are sensitive credentials. Never commit them to version control. Always use environment variables or secure secret management.

Example:

# .env
SLICE_API_KEY=sk_live_abc123...
SLICE_API_URL=https://api.slice.example.com
3

Create a Product and Plan

Set up your licensing structure

Products represent your software applications, and Plans define the licensing tiers (e.g., Basic, Professional, Enterprise). You need at least one product and plan before you can create licenses.

Using the Dashboard:

  1. Go to Products and create a new product
  2. Go to Plans and create a plan for your product
  3. Configure the plan settings (max seats, expiration, features)

Using the API:

# Create a product
POST /api/v1/admin/products
{
  "name": "My Software",
  "description": "My awesome software product"
}

# Create a plan
POST /api/v1/admin/plans
{
  "productId": "<product-id>",
  "name": "Professional",
  "maxSeats": 5,
  "expiresInDays": 365,
  "features": ["feature1", "feature2"]
}

See the Products Guide and Plans Guide for detailed information.

4

Create and Assign a License

Generate a license and assign it to a user

Licenses are created from plans and assigned to users. When a user validates their license, they get access to the features defined in the plan.

Using the Dashboard:

  1. Go to Licenses
  2. Click "Create License" and select a plan
  3. Go to the license details and assign it to a user

Using the API:

# Create a license from a plan
POST /api/v1/admin/licenses
{
  "planId": "<plan-id>"
}

# Assign license to a user
POST /api/v1/admin/licenses/:licenseId/assign
{
  "userId": "user_123"
}
5

Validate a License

Check if a user has a valid license

This is the core operation - validating whether a user has a valid license. This endpoint is called from your application to check license status.

Using the API:

POST /api/v1/validate
Authorization: Bearer sk_live_...
Content-Type: application/json

{
  "userId": "user_123"
}

# Response (valid)
{
  "success": true,
  "data": {
    "valid": true,
    "license": {
      "id": "...",
      "status": "active",
      "features": ["feature1", "feature2"]
    }
  }
}

# Response (invalid)
{
  "success": true,
  "data": {
    "valid": false,
    "reason": "no_license"
  }
}

Using the SDK:

import { SliceClient } from '@sliceapi/sdk';

const client = new SliceClient(process.env.SLICE_API_KEY!);

const result = await client.validate.validate('user_123');

if (result.valid) {
  console.log('License is valid!');
  console.log('Features:', result.features);
} else {
  console.log('License invalid:', result.reason);
}

See the License Validation API documentation for complete details.

Next Steps

You're ready to start! Here are some helpful resources: