Software licensing API
Client validation, key management and an integration checklist for your app
A software licensing API connects a customer's right to use your product with the program they run. It answers whether a key is valid, when it expires and which devices may use it. PWF Auth combines this check with license key management, customer accounts and live sessions.
Two APIs, two different jobs
| Job | Use | Where it runs |
|---|---|---|
| Sign a customer in and maintain their session | Client SDK or authentication API | Your installed application |
| Issue, extend, look up or revoke licenses | Developer API with a scoped API key | Your server, store or internal tooling |
The credentials are different. An application secret configures a client SDK. A Developer API key grants management permissions for one app and belongs on your server. Never put a management API key in a shipped desktop app or browser bundle.
From a purchase to a running application
- Create an application and choose the license duration and device allowance.
- Issue a key in Licenses, through a supported store connection, or from your own backend using the Developer API.
- The customer enters the key in your program. The SDK asks the server to validate it and establish a session.
- Start the heartbeat. Your application must handle session-ended events and stop protected work when the session is refused.
- Use the panel to extend, pause or ban access. Test each action in your application before shipping.
Choose an integration for your language
- C++ licensing for native Windows applications: source client using Windows networking and cryptography.
- Python license keys: install the
pwfauthpackage from PyPI. - C# and VB.NET licensing: install
PWFAuthfrom NuGet. - Node.js and Electron licensing: install
pwfauthfrom npm; keep it in the Node.js process. - Authentication API reference: the encrypted envelope, response verification and endpoints for a custom client.
Use an SDK when possible. A plain JSON request is not a substitute for the authenticated envelope described in the API reference. SDK capabilities differ; read the signature-verification notes for your chosen client.
Example: look up a license from your server
This read-only example uses a Developer API key with See keys permission. Set PWFAUTH_API_KEY and LICENSE_KEY in your server environment. It does not activate the customer or create a session.
import json
import os
from urllib.parse import quote
from urllib.request import Request, urlopen
from urllib.error import HTTPError, URLError
key = quote(os.environ["LICENSE_KEY"], safe="")
request = Request(
"https://pwfauth.com/api/v1/keys/" + key,
headers={"Authorization": "Bearer " + os.environ["PWFAUTH_API_KEY"]},
)
try:
with urlopen(request, timeout=15) as response:
result = json.load(response)
print(result.get("success", False))
except HTTPError as error:
print("License lookup refused:", error.code)
except URLError:
print("License service unavailable; retry later")For key creation, permissions, rate limits and response fields, use the Developer API reference. Keep order fulfillment on your server, record which order received which key, and avoid issuing a second key when a payment notification is retried.
What to verify before release
- Valid, invalid, expired and banned keys produce the right result.
- A running app stops protected work after the server refuses its next heartbeat.
- A customer changing devices sees your intended reset flow.
- Connection failures produce a useful message and respect the SDK's network-loss behavior.
- Logs do not expose credentials or full customer keys.
Questions about licensing APIs
Does a licensing API process payments?
Licensing and payment processing are separate. A store or payment integration confirms a sale; the licensing system then issues or extends access. See supported store connections.
Can I validate keys only in the browser?
Browser code cannot keep a management credential secret. For a web product, enforce access on the server that owns the protected data or operation.
Is PWF Auth an offline licensing system?
PWF Auth's documented client flow uses online sessions and heartbeats. A short connection interruption is different from long-term offline or air-gapped licensing. Compare the licensing models before choosing a provider.
Create a free account, then follow the first-app guide. If you are deciding whether to build the service yourself, read build vs buy software licensing.
Something missing or unclear? Tell us on Telegram