Blog

Tutorials and articles

How to protect and sell your software with licence keys: step-by-step guides with real code, videos and what we learn building PWF Auth

RSS feedVideos on YouTubeChangelog

3 min readSell licence keys automatically: SellAuth, Stripe, Shoppex or your own storeConnect the shop you sell from and every paid order gets its licence keys at once, with nobody pressing anything. Refunds and chargebacks ban the keys by themselves. Setup for SellAuth, Stripe, Shoppex and your own server3 min readA licence client for any language: Java, Kotlin, PHP, Dart, Delphi and moreNo package for your language? The SDK generator in your PWF Auth panel writes a ready licence client in one file, for C#, VB.NET, Python, JavaScript, Java, Kotlin, Android, PHP, Dart, C++ or Delphi, already set up for your app2 min readChange what your app says without a new build: remote texts and slidesSend a welcome line, a support link, a notice or a row of announcement slides to every copy of your program from your PWF Auth panel, with a different text for your VIP customers, and no new build to ship2 min readSave each customer's settings on the server, with no backend of your ownUser variables let your program keep small values per customer on the PWF Auth server: settings that follow them to a new PC, counters, flags and values you set for one customer in the panel. With C#, VB.NET and Python code3 min readHow to add licence keys with an HWID lock to a Node.js appProtect an Electron app, a CLI tool or any Node.js program with licence keys, a one-PC lock and a live kill switch using the free pwfauth package from npm: zero dependencies, TypeScript types included2 min readSee who is running your software right now, and sign anyone outThe Sessions page shows every running copy of your program live: the key, the PC, the city and country, the last check-in. End one session, every session of a key, or every session of an app before a big update2 min readOffer a free trial of your software, once per PCLet new users try your program before they buy: one call gives a PC a trial key for the days you choose, each PC gets one trial, and rules keep trial farmers out. With the code for C#, Python and Node.js3 min readWebhooks for licence keys: get told when keys are made, used, banned or soldPWF Auth calls your server, or posts in your Discord channel, when something happens to your keys: made, first used, banned, leaked, sold in a store order. Signed deliveries, automatic retries, and the code to check them3 min readManage licence keys from your own code with the Developer APIMake, look up, ban, extend and reset licence keys from your own bot, store, website or script with a simple REST API: API keys per app with only the rights they need, and examples in Python and JavaScript2 min readA self-service portal for your customers' licence keysGive your customers one link where they sign in with their licence key, see how long it runs and where it's used, move it to a new PC and sign out old copies, without writing to you and without opening your program3 min readHow to stop customers sharing your software after you sell itOne paid copy shared in a group chat can cost you dozens of sales. Here are the layers that stop it: a key locked to one PC, a live check-in, sign-in rules, a watch for shared keys, and marks that say who leaked a copy3 min readWhat is an HWID lock? Licence keys bound to one PC, explainedAn HWID lock binds a licence key to the computer it was first used on, so one paid key can't run on a stranger's PC. How the hardware ID is made, what happens when a customer changes PC, and how to allow two or more PCs3 min readFind out who leaked your software: marked copies, decoy keys and a sign-in watchWhen a copy of your program turns up on a forum, PWF Auth's leak tracer tells you whose key it came from: every customer downloads their own marked copy, decoy keys catch leakers, and a sign-in watch flags shared keys3 min readBlock VPNs, countries and data centres from signing in to your appSign-in rules decide who may not use your app at all, before the key is even checked: block an address, a range, a provider or a country, refuse VPNs and hosting addresses, or allow only the places you trust2 min readHow to ship updates to your software: channels, staged rollout and required updatesUpload a build once and every copy of your program that checks for updates is offered it, with a checksum to verify the download. Test it on a beta channel, roll it out to half your customers, and make it required when you must3 min readHow to add licence keys with an HWID lock to a Python appProtect a Python program with licence keys, a one-PC lock and a live kill switch using the free pwfauth package from PyPI: install it, sign in, start the heartbeat, read the licence and move a key to a new PC3 min readHow to add licence keys with an HWID lock to a C++ Windows appAdd licence keys, a one-PC lock and a live kill switch to a native C++17 Windows program with the free PWF Auth client: two files on WinHTTP and Windows CNG, a sign-in, the heartbeat and moving a licence to a new PC3 min readCustomer accounts that renew with a licence keyLet customers sign in to your program with a username and password, and renew by entering a licence key that adds its time to their account, even after it expired. With sign-up settings, linked apps and C# code3 min readA free Discord licence bot: claim, check and manage keys in your serverAdd PWF Auth's bot to your Discord server and link it to your app: customers claim keys and move to a new PC with slash commands, staff make and ban keys, and a buyer role marks everyone with a valid key2 min readYour keys, your format: custom licence key formats for apps and resellersMake your licence keys look like your brand, such as MYAPP-XXXXXXXX: one format per app, a different one for a single batch, imported keys from an older system, and a format for each reseller3 min readHow PWF Auth works: licence keys, HWID lock and a live kill switchWhat happens between your program and PWF Auth: the sign-in that opens a session, the 30-second heartbeat that delivers a ban, the HWID lock that keeps a key on one PC, and the encryption that stops fake answers3 min readHow to add licence keys with an HWID lock to a C# or VB.NET appAdd licence keys, a one-PC lock and a live kill switch to a WinForms, WPF or console app in C# or VB.NET with the free PWFAuth NuGet package: install it, sign in, start the heartbeat and move a licence to a new PC3 min readGive your app its own Telegram licence bot, for freeConnect your own Telegram bot to a PWF Auth app: customers claim their key, see the time left and move to a new PC; your team makes and bans keys from the chat; and a buyers' group lets in only people with a valid key3 min readHow to let resellers sell your software: credits, prices and key trackingGive resellers an account and credits, set what each key costs, and let them make keys for their customers from their own portal, while PWF Auth keeps the books, refunds and every sale for you3 min readLet people help with your app without sharing your passwordPWF Auth teams give a helper their own access to one of your apps: pick a role, tick exactly what they may do, set a daily limit, and see every change they make, with alerts on Telegram2 min readHow to add licence keys and a kill switch to an Android appProtect an Android app with licence keys, customer accounts and a remote kill switch in five steps, with one Kotlin file from the SDK generator and a complete demo app on GitHub