Python integration

Use a Python SDK module with Ghotz API at https://keyghotz.space/api/1.2/.

1. Setup

pip install requests

Copy the API class file from your example (often keyauth.py) and rename if you want.

2. Configure

from keyauth import api  # or your renamed module

ghotzapp = api(
    name="YOUR_APP",
    ownerid="YOUR_OWNERID",
    version="1.0"
)

Edit the module: set API URL to https://keyghotz.space/api/1.2/ (replace any old host).

3. Auth flow

ghotzapp.init()
if not ghotzapp.response["success"]:
    print(ghotzapp.response["message"])
    exit(1)

ghotzapp.login(username, password)
# or: ghotzapp.register(user, pass, key)
# or: ghotzapp.license(key)

if ghotzapp.response["success"]:
    print("Licensed!")
else:
    print(ghotzapp.response["message"])

4. Extras

ghotzapp.var("server_msg")
ghotzapp.log("started")
ghotzapp.webhook("id", "param=value")

C++ → · Website →