API & Webhook Logging (configuration/server/api.lua)
The file configuration/server/api.lua controls all external logging to Discord, Fivemanage, Fivemerr, and WebRTC TURN server credentials.
Log Service Modes
Lua
Config.Api = {
Enabled = true,
--- 'discord' | 'fivemanage' | 'fivemerr' | 'none'
LogService = 'discord',
BotName = '5M Phone Logs',
DefaultColor = 1942002,
FivemanageResource = 'fmsdk',
FivemanageDataset = '5m_phone',
}Per-App Discord Webhooks
Each phone application can route activity logs to a dedicated Discord channel webhook:
Lua
Config.Api.DiscordWebhooks = {
camera = 'https://discord.com/api/webhooks/...',
xbirdPost = 'https://discord.com/api/webhooks/...',
instaPost = 'https://discord.com/api/webhooks/...',
instaLive = 'https://discord.com/api/webhooks/...',
recorder = 'https://discord.com/api/webhooks/...',
ypage = 'https://discord.com/api/webhooks/...',
services = 'https://discord.com/api/webhooks/...',
payus = 'https://discord.com/api/webhooks/...',
messages = 'https://discord.com/api/webhooks/...',
calls = 'https://discord.com/api/webhooks/...',
news = 'https://discord.com/api/webhooks/...',
dispatch = 'https://discord.com/api/webhooks/...',
darkchat = 'https://discord.com/api/webhooks/...',
mail = 'https://discord.com/api/webhooks/...',
}Cloudflare Realtime TURN Credentials
Required for peer-to-peer WebRTC video calling across different NATs and firewalls:
Lua
Config.Api.WebRTC = {
TokenID = 'YOUR_CLOUDFLARE_TURN_TOKEN_ID',
APIToken = 'YOUR_CLOUDFLARE_TURN_API_TOKEN',
}