← Back

Documentation

How to integrate your software with this authentication platform.

1. Get your credentials

Create an application in the admin panel and copy:

  • app_id — public application id
  • app_secret — secret (keep private, send as x-secret header or secret query)

2. API endpoints

All endpoints accept application/json or x-www-form-urlencoded.

POST/api/1.0/init
POST/api/1.0/login
POST/api/1.0/register
POST/api/1.0/license
POST/api/1.0/var
POST/api/1.0/log
POST/api/1.0/logout

3. Example flow

# 1) Init
curl -X POST https://your-domain/api/1.0/init \
  -H "Content-Type: application/json" \
  -d '{"appid":"YOUR_APP_ID","secret":"YOUR_APP_SECRET","hwid":"abc123"}'
# => { "success": true, "data": { "sessionid": "..." } }

# 2) Register
curl -X POST https://your-domain/api/1.0/register \
  -H "Content-Type: application/json" \
  -d '{"appid":"YOUR_APP_ID","secret":"YOUR_APP_SECRET","sessionid":"...","username":"user1","password":"pass","key":"XXXXX-XXXXX-XXXXX-XXXXX","hwid":"abc123"}'

# 3) Login
curl -X POST https://your-domain/api/1.0/login \
  -H "Content-Type: application/json" \
  -d '{"appid":"YOUR_APP_ID","secret":"YOUR_APP_SECRET","sessionid":"...","username":"user1","password":"pass","hwid":"abc123"}'

# 4) Validate license
curl -X POST https://your-domain/api/1.0/license \
  -H "Content-Type: application/json" \
  -d '{"appid":"YOUR_APP_ID","secret":"YOUR_APP_SECRET","sessionid":"...","key":"XXXXX-XXXXX-XXXXX-XXXXX","hwid":"abc123"}'

4. Local setup

  1. Create a free Supabase project at supabase.com
  2. Run supabase/schema.sql in the SQL editor
  3. Copy .env.local.example to .env.local and fill in the values
  4. npm install then npm run dev
  5. Login at /dashboard/login with the bootstrap credentials you set