REST API v1 • WEBHOOKS • FIVEM LUA

Geliştirici & API Referansı

FiveM sunucunuza özel otomatik tarama komutları bağlayın, webhook bildirimlerini yakalayın veya kendi staff panelinizle tam entegrasyon sağlayın.

Kimlik Doğrulama (Authentication)

Vyro Scanner API servislerine gönderilen tüm istekler, müşteri panelinizden (Dashboard) temin edilen sunucu API anahtarınızı (Bearer Token) taşımalıdır.

HTTP HEADERS JSON
Authorization: Bearer vyro_live_9f8a3c2e1b4d5e6f7a8b Content-Type: application/json Accept: application/json

POST /api/v1/sessions/create

Belirtilen oyuncu için 6 haneli tek kullanımlık oturum PIN'i oluşturur.

İstek Gövdesi (Request Body):

PAYLOAD JSON
{ "targetPlayer": "Elysium_Staff", "discordUserId": "48920194820192849", "reason": "Çatışma şüphesi", "staffId": "Admin_Vater", "expiresInMinutes": 30 }

Yanıt (Response 201 Created):

RESPONSE JSON
{ "success": true, "pin": "VYRO01", "sessionId": "ses_7f8a9b1c2d3e", "expiresAt": "2026-10-25T02:30:00Z", "downloadUrl": "https://vyro.ac/download" }

Webhook Bildirim Formatı (Tarama Tamamlandı)

Oyuncu istemcide taramayı tamamladığı anda sunucu webhook adresinize aşağıdaki JSON verisi POST edilir:

WEBHOOK EVENT: scan.completed JSON
{ "event": "scan.completed", "pin": "VYRO01", "verdict": "CLEAN", // "CLEAN" | "SUSPICIOUS" | "THREAT_DETECTED" "threatCount": 0, "durationSeconds": 44.8, "telemetry": { "os": "Windows 11 Pro 64-bit (24H2)", "smbiosSpoofed": false, "motherboardSerial": "L1HF8820491", "usbCount": 3, "usnJournalClean": true }, "sha256Hash": "d752b06b4b59f86dbd667a4a11f94de3e46e51207cc127b177aca7089215b72c", "reportUrl": "https://vyro.ac/report/d752b06b" }

FiveM Lua Entegrasyonu (Server-Side)

Oyun içinden yetkili /ss [id] yazdığında otomatik PIN üretip oyuncunun ekranına bildirim basan örnek FiveM scripti:

server.lua Lua
RegisterCommand("vyroscan", function(source, args) local targetId = tonumber(args[1]) if not targetId or not GetPlayerName(targetId) then return end PerformHttpRequest("https://api.vyro.ac/v1/sessions/create", function(err, text, headers) if err == 200 or err == 201 then local data = json.decode(text) TriggerClientEvent("chat:addMessage", targetId, { color = {59, 130, 246}, args = {"VYRO SCANNER", "Güvenlik kontrolü başlatıldı! PIN Kodunuz: " .. data.pin .. " - vyro.ac adresinden istemciyi çalıştırın."} }) end end, "POST", json.encode({ targetPlayer = GetPlayerName(targetId) }), { ["Authorization"] = "Bearer vyro_live_secret_key", ["Content-Type"] = "application/json" }) end, true)