Documentation / Integrations
Integrations
Roblox integration
Connect server-side Roblox scripts to AviMiles.
Step by step
- Open Developer in the airline dashboard and create an API key.
- Enable HTTP Requests in Roblox Studio.
- Store the key in a server-only script, never in a LocalScript or ReplicatedStorage.
- Use the example below to test check-in on a test flight.
- Review attendance and revoke any exposed key.
More information
In Roblox Studio, enable Game Settings → Security → Allow HTTP Requests. Put your API key in a server-only Script inside ServerScriptService, not a LocalScript or ReplicatedStorage.
Automatic check-in example
local HttpService = game:GetService("HttpService")
local Players = game:GetService("Players")
local API_KEY = "PASTE_YOUR_API_KEY"
local BASE = "https://avitech.tech/api/v1"
local function call(method, path, body)
local response = HttpService:RequestAsync({
Url = BASE .. path,
Method = method,
Headers = {
["Authorization"] = "Bearer " .. API_KEY,
["Content-Type"] = "application/json"
},
Body = body and HttpService:JSONEncode(body) or nil
})
if not response.Success then
warn("AviMiles:", response.StatusCode, response.Body)
return nil
end
return HttpService:JSONDecode(response.Body)
end
local function checkIn(player)
local active = call("GET", "/checkin/open")
if not active or not active.open then
warn("No flight currently accepting check-ins")
return
end
local result = call("POST", "/flights/" .. active.flight.id .. "/checkin", {
roblox_id = tostring(player.UserId)
})
if result then print("AviMiles check-in:", result.ok) end
end
Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
if message:lower() == "!checkin" then checkIn(player) end
end)
end)This example uses !checkin only for testing. In your real check-in system, call checkIn(player) when the passenger successfully checks in. Validate the player server-side.
AviMiles / Docs