Skip to content

Setting up API with Your Code

tago edited this page Apr 28, 2024 · 7 revisions

How to Implement AKoDAuth API* Into Your Code

The AKoDAuth Flask API is a tool for secure user authentication and access control. With customizable database settings, it gives flexibility in deployment across various platforms. Through encryption and decryption functionalities, it securely manages activation keys, private keys, and public keys. The API includes node locking capabilities, restricting access to authorized devices. By cross-referencing hardware IDs, it ensures that user accounts are not used on different devices.

Use ValidateV2 to add HWID/Node locking or IP locking to your license keys

Implement Flare Helper

  1. Install the Flare Helper python package
    pip install flare-helper
  2. Import the API from the helper
    from flare import API
  3. Initialize the API
    api = API(
        apilink="server api link",  
        private_key="private key from identifiers.txt", 
        public_key="public key from identifiers.txt"
    )
    api.setprivate()
    api.setpublic()
  4. Validate a user
    api.auth(
        activation_key=" ",
        login=" ", 
        password=" "
    )
    response = api.validate()
    if response.text == 'VALID':
        print("Hello, World!")

Implement AKoDAuth into your code old fashion way

For now AKoDAuth can only be used for Python scripts. If you want to contribute and attempt to expand please feel free. This code is for your program that you will be distributing.

  1. Set and post your private and public key
    private_key = "private key from identifiers.txt"
    publicserverkey = "public key from identifiers.txt"
    requests.post('https://api.yourdomain.com/privatekey', data={'key': private_key})
    requests.post('https://api.yourdomain.com/publickey', data={'key': publicserverkey})
  2. Create a way to input activation key, username, and login
    activationkey = input ("Enter activation key: ")
    username = input("Enter username: ")
    password = input("Enter password: ")
  3. Create a post request to your API to check for the account credentials
    response = requests.post('https://api.yourdomain.com/validate', data={'username': username, 'password': password, 'key': activationkey})
  4. If the response is "VALID", start your code!
    if response.text == "VALID":
      print("Hello, World!")
  5. OPTIONAL In order to hide your private key and licensing website link, I recommend you obfuscate your code with a python obfuscator. Hyperion is very advanced. Additionally, if you create an executable from your python code it will be difficult to decompile.

*NOTE: The AKoDAuth API provided is heavily modified to work with Linux and Flare

Clone this wiki locally