Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 1.13 KB

File metadata and controls

40 lines (27 loc) · 1.13 KB

Example Machine Activation

This is an example of a typical machine activation flow written in Python. You may of course choose to implement a different flow if required - this only serves as an example implementation.

Running the example

First up, configure a few environment variables:

# Your Keygen account ID. Find yours at https://app.keygen.sh/settings.
export KEYGEN_ACCOUNT_ID="YOUR_KEYGEN_ACCOUNT_ID"

You can either run each line above within your terminal session before starting the app, or you can add the above contents to your ~/.bashrc file and then run source ~/.bashrc after saving the file.

Next, install dependencies with pip:

python3 -m pip install -r requirements.txt

Activating a machine

To perform a machine activation, run the script and supply a license key:

python3 main.py some-license-key-here

The script will use a SHA256-HMAC of your device's machineid for the machine's fingerprint.

Questions?

Reach out at [email protected] if you have any questions or concerns!