ADMS Server adalah middleware komunikasi antara mesin fingerprint ZKTeco (Solution) dan server aplikasi menggunakan mekanisme push & pull. Server ini mengelola registrasi perangkat, penarikan log, pengiriman command, autentikasi, serta integrasi webhook otomatis.
Setiap data attendance yang masuk akan dikirim ke webhook tujuan.
Format body:
{
"sn": "NJF72417xxxx",
"timestamp": "2025-12-04 17:06:47",
"user_id": "1234567890",
"verify": 1,
"status": 4,
"workcode": 0
}Setiap request webhook di sertakan di header :
x-adms-signature: sha256(timestamp + secret)
x-adms-timestamp: 1733300000
git clone https://github.com/sejator/adms-server.git
cd adms-server
npm installEnvironment:
Rename file .env.example menjadi .env dan sesuaikan
DATABASE_URL="postgresql://postgres:@localhost:5432/adms_api?schema=public"
JWT_SECRET="xxx"
JWT_EXPIRES=3600
JWT_REFRESH_SECRET="xxx"
JWT_REFRESH_EXPIRES=31536000Jalankan:
npm run start:dev
Membuat akun admin.
Body:
{
"name": "Sejator Dev",
"email": "admin@gmail.com",
"password": "123456"
}Response:
{
"success": true,
"data": {
"id": 1,
"email": "admin@gmail.com"
}
}{
"email": "admin@gmail.com",
"password": "123456"
}Response:
{
"success": true,
"data": {
"access_token": "...",
"refresh_token": "...",
"expires_in": 3600
}
}{
"refresh_token": "xxx"
}Contoh create:
{
"name": "Administrator",
"email": "admin@example.com",
"password": "123456"
}- serial_number
- location
- webhook_url (bisa lebih dari satu pisahkan dengan tanda koma)
- delay (detik)
- error_delay
Contoh body create:
{
"serial_number": "NJF72417xxxx",
"location": "Kantor Pusat",
"webhook_url": "https://webhook.com/attendance"
}Semua command dikirim oleh device menggunakan header:
x-public-key: <public_key>
{
"type": "<command_name>"
}Command Type Deskripsi
checkCek status serverresetReset dan kirim ulang semua loginfoInfo devicelogMinta log terbarurebootReboot devicereloadReload configurationset.timezoneAtur timezoneset.volumeAtur volumeset.languageAtur bahasauser.infoAmbil info useruser.editEdit useruser.deleteHapus useruser.cloneClone user ke banyak deviceuser.movePindahkan user ke device lainattendance.downloadDownload log range tanggalattendance.verifyVerifikasi log oleh deviceattendance.clearClear log devicecommand.systemEksekusi perintah OS (hat-hati menggunakan ini)
{
"type": "set.timezone",
"timezone": "7"
}{
"type": "user.edit",
"user_id": "125010xxx",
"name": "Sejator Dev",
"privilege": 14,
"password": 1234
}{
"type": "attendance.download",
"start_date": "2025-12-04",
"end_date": "2025-12-10"
}- Postman Collection: https://documenter.getpostman.com/view/20500330/2sB3dPQp8E
- Verifikasi webhook NodeJS : https://gist.github.com/sejator/e6892e8cdfbf726652f2ba7fa66201ab
- Verifikasi webhook PHP : https://gist.github.com/sejator/849e410b4534db6d807d699d4d3ad866
Maintainer: @sejator
Email: sejatordev@gmail.com
Website: https://alkhatech.com
Donasi: https://saweria.co/sejator