Sorry, we don't support your browser.  Install a modern browser

Add Optional "unique_name:true" for "v1/licenses/activate" to Prevent Duplicate Instances on Same Device

?

Hi there,

I’m currently integrating Lemon Squeezy’s license key system into a cross-platform Qt/C++ application, which is open source under GPLv3. I’m using the /licenses/activate endpoint as recommended, and generating a machine-specific identifier (e.g. instance_name) to bind the license key activation to a specific device.

The issue I’m running into is that each call to /licenses/activate always creates a new instance, even if the instance_name is exactly the same. This causes a few real-world problems:

  • If a user reinstalls the app or clears app data, the instance_id is lost locally.
  • When the user tries to reactivate with the same license on the same machine, a new instance is created, incrementing the activation_usage unnecessarily.
  • Over time, this can hit the activation_limit, even though the user is just using a single machine.

Because my app is open source, I can’t safely use API keys or secrets to look up existing instances, and there’s no endpoint for retrieving a list of activations by key from the client side.

It would be incredibly useful if the /licenses/activate endpoint could support an optional additional parameter like:

“license_key”: “…”,
“instance_name”: “MyMachineID”,
“unique_name”: true
}

This would instruct Lemon Squeezy to reuse the existing instance with that name, if it already exists for the license. This avoids duplicating activations unnecessarily and makes licensing more robust for open-source, client-only environments.

Let me know if this is something you could consider. It would really help developers trying to do things right with minimal backend complexity.

Thanks!

Best,
Alex Spataru
serial-studio.com

a year ago