Quickstart
You can set up Keyforge in your project within minutes. This guide will walk you through the steps to get started.
Choose whether to integrate Keyforge directly in your client or server.
Client-side
Integrate Keyforge into a desktop app, browser extension, or anything else.
Server-side
Set up Keyforge in a backend server, API, or any other server-side application.
Managing licenses in the server
To manage licenses in your server, use the Keyforge API. You need an API key to use it.
Prerequisites
Before you begin, make sure you have completed the following steps:
Create a license
In this example, we will create a license that never expires and can only have 1 device active at the same time. Copy the returned license key.
curl -X POST https://keyforge.dev/api/v1/licenses \
-H "Authorization: Bearer sk_1234" \
-H "Content-Type: application/json" \
-d '{
"productId": "p_123456",
"type": "perpetual",
"maxDevices": 1,
"email": "[email protected]"
}'Activate a license
Activate the license you have just created. Replace LICENSE_KEY with the license key you copied in the previous step. In this example, we will activate the license on a device with the identifier some_device_id and the name My computer name.
curl -X POST "https://keyforge.dev/api/v1/licenses/activate" \
-H "Authorization: Bearer sk_1234" \
-H "Content-Type: application/json" \
-H "License-Key: LICENSE_KEY" \
-d '{
"productId": "p_123456",
"device": {
"identifier": "some_device_id",
"name": "My computer name"
}
}'Validate a license
Validate the license you have just activated. Replace LICENSE_KEY with the license key. In this example, we will verify the license on the device with the identifier some_device_id.
curl -X POST "https://keyforge.dev/api/v1/licenses/validate" \
-H "Authorization: Bearer sk_1234" \
-H "Content-Type: application/json" \
-H "License-Key: LICENSE_KEY" \
-d '{
"productId": "p_123456",
"deviceIdentifier": "some_device_id"
}'Congratulations! 🎉
You have successfully created, activated, and validated your first license. You can manage all licenses in the dashboard.
Learn more
Next steps
Some features to explore and extend your licensing system.
Integrate with Stripe
Generate licenses on purchases and subscriptions.
Offline licensing
Validate licenses without internet access.
Public API
Keyforge also provides a public API that you can use directly in your app, without the need to create a backend.
API Reference
Learn more about the Keyforge API.