SellRealm API Documentation

Integrate powerful eCommerce and license management into your applications.

Welcome to SellRealm API

SellRealm provides two powerful APIs to help you manage your digital products and license systems:

License API (v0)

  • Key verification & login
  • HWID binding & management
  • Session management
  • License variables & logging

Store API (v1)

  • Product management
  • Order processing
  • Customer data
  • Analytics & reporting
API Endpoints
Endpoints
License API (v0): https://sellrealm.com/api/v0/
Store API (v1):   https://sellrealm.com/api/v1/

Authentication

Secure your API requests with dual-secret authentication.

Dual-Secret Authentication System

SellRealm implements an enhanced security model with separate authentication secrets for each API, providing better isolation and security for your store operations.

Authentication Secrets

APISecret TypeUsageLevel
License API (v0)auth_secretLicense verification, sessions, HWID operationsHigh Security
Store API (v1)store_secretStore data management, products, ordersAdministrative

Finding Your Secrets

  1. Log into your SellRealm dashboard
  2. Navigate to Store Settings
  3. Copy your 48-character auth_secret for License API
  4. Copy your 48-character store_secret for Store API
  5. Keep both secrets secure — never share them publicly
Security Notice: Each secret provides full access to its respective API. Treat them like passwords and never expose them in client-side code or public repositories.
Compromised Secrets: If either secret is compromised, regenerate it from Store Settings. The old secret is immediately invalidated.
Request Format

License API (v0) — Encrypted POST

HTTP
POST https://sellrealm.com/api/v0/
Content-Type: application/x-www-form-urlencoded

auth_secret=your_48_char_auth_secret
[encrypted payload parameters]

Store API (v1) — Bearer Token

HTTP
GET https://sellrealm.com/api/v1/products
Authorization: Bearer your_48_char_store_secret
Content-Type: application/json

SDKs & Libraries

Official SDKs and community libraries for easy integration.

Official SDKs

SellRealm provides officially maintained SDKs that handle all complexity of encryption, session management, and secure communications.

Python SDK

Full-featured library with async support, automatic session management, and comprehensive error handling.

View on GitHub

C++ SDK

High-performance library optimized for native applications, games, and enterprise software solutions.

View on GitHub

SDK Features

  • Automatic Encryption: All data encrypted and decrypted automatically
  • Session Management: Handles login, validation, and logout automatically
  • HWID Detection: Platform-specific hardware ID generation
  • Error Handling: Comprehensive error handling with detailed messages
  • Thread Safety: Safe for use in multi-threaded applications
  • Retry Logic: Automatic retry on network failures
Error Codes & Troubleshooting

HTTP Status Codes

CodeMeaningDescription
200OKRequest successful
400Bad RequestInvalid request parameters
403ForbiddenInvalid auth_secret/store_secret or unauthorized
405Method Not AllowedIncorrect HTTP method used
429Too Many RequestsRate limit exceeded

Common Error Messages

ErrorCauseSolution
Invalid key or auth secretWrong license key or auth_secretVerify your auth_secret for License API
Invalid store secretWrong store_secret for Store APICheck your 48-char store_secret in dashboard
HWID does not matchKey bound to different hardwareReset HWID or use correct device
Session has expiredSession timeout reachedRe-authenticate with login method
Key has been bannedKey permanently disabledContact support or use valid key
Too Many RequestsRate limit exceededReduce request frequency
Need Help? If you encounter errors not listed here, contact support through your SellRealm dashboard. Remember to use the correct secret for each API.

License API (v0)

Secure license verification and authentication system.

Overview

The License API provides comprehensive license key management for protecting your software applications. It handles license verification, user authentication, HWID binding, session management, variable storage, and audit logging. All communications use enterprise-grade encryption and require your auth_secret.

Base URL

https://sellrealm.com/api/v0/

Available Operations

OperationType ValueDescription
Verify Key / LoginDefault (no type)Verify a license key and create authenticated session
Check Sessioncheck_sessionValidate an existing session
Get HWIDget_hwidRetrieve stored HWID for a key
Reset HWIDreset_hwidClear HWID binding for a key
Restore HWIDrestore_hwidSet specific HWID for a key
Terminate Sessionterminate_sessionEnd an active session
Log Actionlog_actionLog custom actions for audit trails
Ban Keyban_keyPermanently ban a license key
Security: All data transmitted to the License API is encrypted. The official SDKs handle all encryption/decryption automatically.

Verify Key / Login

Authenticate users and create secure sessions.

POST /api/v0/

Verifies a license key, authenticates the user, binds the key to hardware ID, and creates an authenticated session. This is the primary authentication method — equivalent to a user login. Returns license variables and user information upon successful authentication.

Core Parameters

ParameterTypeRequiredDescription
keystringRequiredUser's license key (encrypted)
auth_secretstringRequiredYour 48-character auth secret
hwidstringRequiredUser's hardware ID (encrypted)
product_idintegerRequiredID of the product being accessed
timestampintegerOptionalClient timestamp for time validation

Success Response

JSON
{
  "status": "success",
  "message": "Key is valid",
  "session_id": "a1b2c3d4e5f6...",
  "session_expires_at": "2024-12-25 12:00:00",
  "nonce": "random_nonce_value",
  "key_expires_at": "2024-12-31",
  "variables": {
    "app_version": "1.0.0",
    "feature_flag": true
  },
  "server_time": 1703512800,
  "level": 1
}

Error Response

JSON
{
  "status": "error",
  "message": "Invalid key or auth secret"
}

Check Session

Validate existing sessions without re-authentication.

POST /api/v0/

Validates an existing session without requiring full key verification. Use this for periodic checks to ensure the user's session is still valid and active.

Request Parameters

ParameterTypeRequiredDescription
typestringRequiredMust be "check_session"
session_idstringRequiredSession ID from login response
auth_secretstringRequiredYour 48-character auth secret
noncestringRequiredCurrent session nonce
product_idintegerRequiredID of the product being accessed

Success Response

JSON
{
  "status": "success",
  "message": "Session is active and key is valid",
  "nonce": "new_nonce_value",
  "key_expires_at": "2024-12-31",
  "level": 1,
  "server_time": 1703512800
}
Security: Each session check returns a new nonce. Always use the latest nonce for subsequent requests to prevent replay attacks.

License Variables

Secure server-side variable storage for sensitive data.

Overview

License Variables provide a secure way to store sensitive information on SellRealm's servers instead of hardcoding values in your application. These variables are automatically returned during successful login/verification.

Variable Types

TypeDescriptionUse Case
StringText-based valuesAPI keys, configuration values, URLs
BooleanTrue/false valuesFeature flags, enable/disable settings
FileBinary file dataConfiguration files, certificates, assets
Security Benefit: By using License Variables, you can keep sensitive API keys and configuration data on SellRealm's secure servers instead of embedding them in your application code.

Example Variable Response

JSON
{
  "variables": {
    "api_endpoint": "https://api.example.com/v1",
    "premium_features": true,
    "max_users": "100",
    "secret_key": "sk_live_abc123def456"
  }
}

Common Use Cases

  • API Keys: Store third-party API keys securely
  • Feature Flags: Enable/disable features remotely
  • Configuration: Server URLs, timeouts, limits
  • Licensing Tiers: Different features per license level
  • Updates: Minimum version requirements, update URLs

HWID Management

Manage hardware ID bindings for license keys.

Hardware ID (HWID) management allows you to bind license keys to specific devices, preventing unauthorized sharing while providing flexibility for legitimate use cases.

POST /api/v0/
Get HWID

Retrieve the currently stored HWID for a license key.

ParameterRequiredDescription
typeRequired"get_hwid"
keyRequiredLicense key (encrypted)
auth_secretRequiredYour auth secret
JSON Response
{
  "status": "success",
  "message": "HWID retrieved",
  "hwid": "ABC123-DEF456-GHI789"
}
Reset HWID

Clear the HWID binding for a license key, allowing it to be used on a different device.

ParameterRequiredDescription
typeRequired"reset_hwid"
keyRequiredLicense key (encrypted)
auth_secretRequiredYour auth secret
JSON Response
{
  "status": "success",
  "message": "HWID reset successfully"
}

Session Management

Control active sessions and prevent unauthorized access.

POST /api/v0/
Terminate Session

Terminate an active session, logging the user out and requiring re-authentication.

ParameterRequiredDescription
typeRequired"terminate_session"
keyRequiredLicense key (encrypted)
session_idRequiredSession ID to terminate
nonceRequiredCurrent session nonce
auth_secretRequiredYour auth secret
JSON Response
{
  "status": "success",
  "message": "Session terminated"
}

Log Action

Custom action logging for audit trails and monitoring.

POST /api/v0/

Log custom actions for audit trails and monitoring. Track specific user activities, security events, or application usage for compliance and analytics purposes.

ParameterRequiredDescription
typeRequired"log_action"
keyRequiredLicense key (encrypted)
action_typeRequiredType of action being logged
action_detailsOptionalAdditional details about the action
auth_secretRequiredYour auth secret

Example Use Cases

  • Security Events: Failed login attempts, permission changes
  • Feature Usage: Premium feature access, API calls
  • Compliance: Data access, export operations
  • Analytics: User behavior, performance metrics
JSON Response
{
  "status": "success",
  "message": "Action logged successfully"
}

Ban Key

Permanently disable license keys.

POST /api/v0/

Permanently ban a license key and terminate all associated sessions. This is an irreversible security action used to prevent further access by compromised or misused keys.

Warning: This action is irreversible. Banned keys cannot be reactivated and all active sessions will be immediately terminated.
ParameterRequiredDescription
typeRequired"ban_key"
keyRequiredLicense key to ban (encrypted)
auth_secretRequiredYour auth secret
reasonOptionalReason for banning (encrypted)

Common Ban Reasons

  • Security Breach: Key compromised or unauthorized access detected
  • Terms Violation: User violated license terms or usage policy
  • Fraud: Fraudulent purchase or chargeback
  • Abuse: Excessive API usage or system abuse
JSON Response
{
  "status": "success",
  "message": "Key has been banned successfully"
}

Store API (v1)

Manage your store data and operations.

Overview

The Store API provides access to your store's data including products, orders, customers, and analytics. This API uses your store_secret for authentication and is currently in development with basic functionality available.

Work in Progress: The Store API is under active development. Endpoints and functionality may change as we continue to improve the platform.

Base URL

https://sellrealm.com/api/v1/

Authentication

All Store API requests require your store_secret in the Authorization header:

HTTP
Authorization: Bearer your_48_char_store_secret

Products API

Manage your store products.

Note: Product management endpoints are currently basic and will be expanded with additional features.
GET /api/v1/products
List Products

Retrieve a list of all products in your store.

HTTP Headers
Authorization: Bearer your_48_char_store_secret
JSON Response
[
  {
    "product_id": 1,
    "title": "Sample Product",
    "price": 25.00,
    "stock": null,
    "created_at": "2024-05-16 05:24:48"
  }
]
POST /api/v1/products
Create Product

Create a new product in your store.

HTTP Headers
Authorization: Bearer your_48_char_store_secret
Content-Type: application/json

Request Body

JSON
{
  "title": "New Product",
  "price": 19.99,
  "stock": 100
}
JSON Response
{
  "message": "Product created successfully",
  "product_id": 4
}

Orders API

Access order information and transaction data.

Coming Soon: Order management endpoints are planned for future releases. Current order data can be accessed through the dashboard.
Planned Features
  • Retrieve order history
  • Get order details by ID
  • Update order status
  • Process refunds
  • Track order analytics

Keys API

Manage license keys through the Store API.

Note: For runtime key operations (verification, authentication, session management), use the License API (v0) with your auth_secret. This endpoint is for administrative key management using your store_secret.
GET /api/v1/keys
List Keys

Retrieve a list of license keys in your store.

HTTP Headers
Authorization: Bearer your_48_char_store_secret
JSON Response
[
  {
    "key_id": 1,
    "key_value": "6CE3-5E57-45C7-7B12",
    "status": "Used",
    "created_at": "2024-05-17 08:39:47"
  }
]