Quickstart
You can set up Keyforge in your project within minutes. This guide will walk you through the steps to get started.
Choose the appropriate quickstart guide for your use case:
Client-side
Integrate Keyforge into a desktop app, browser extension, or anything else.
Server-side
Manage licenses through the Keyforge API in your backend, or any other server-side application.
Licensing a client application
To validate and activate licenses in the client, use the Public API directly in your app. You can use this API anywhere, with any programming language.
Prerequisites
Before you begin, make sure you have completed the following steps:
Activate a license
The first time a user opens your app, they should be prompted to activate their license.
The device identifier needs to be unique inside the license scope. You can use a HWID or any other type of identifier that is unique to a device. Take a look here for recommended approaches on each platform.
curl -X POST https://keyforge.dev/api/v1/public/licenses/activate \
-H "Content-Type: application/json" \
-d '{
"licenseKey": "ABCDE-ABCDE-ABCDE-ABCDE-ABCDE",
"deviceIdentifier": "some_device_id",
"deviceName": "My device",
"productId": "p_123456"
}'A productId property can also be an array of IDs if your app supports
multiple products, like different tiers.
Validate a license
When your app starts, verify the license to check if it's valid.
You can validate a license whenever you like, for example every hour, to ensure that it is still valid. Or even better, use license tokens to validate licenses offline without making API requests.
curl -X POST https://keyforge.dev/api/v1/public/licenses/validate \
-H "Content-Type: application/json" \
-d '{
"licenseKey": "ABCDE-ABCDE-ABCDE-ABCDE-ABCDE",
"deviceIdentifier": "some_device_id",
"productId": "p_123456"
}'Congratulations! 🎉
You have successfully activated and validated your first license inside your app. You can manage all licenses in the dashboard.
Learn more
Next steps
Some features to explore and extend your licensing system.
Integrating with payments
Generate licenses on purchases and subscriptions.
Offline licensing
Validate licenses without constant internet access.
Public API
Learn more about the Public API. An API key is not needed to use it.