Setup
Remote access is disabled by default. Enable it and allowlist each calling server resource ineventsCctv/config/remote.lua:
RemoteAccessEnabled = true.
Server exports
CreateRemoteSession(playerSource, terminalId)
Creates a short-lived session for an authorized player and terminal.
Returns
token, nil on success or nil, errorMessage on failure. The token is a 48-character secret. Do not log it or send it to another player.
ValidateRemoteSession(token)
Validates a session and returns the cameras available through its terminal.
Returns
nil, errorMessage when the token is expired, belongs to another calling resource, or access has been revoked. Validation re-checks the player, terminal, remote-access setting, and permissions each time.
Security boundary
Both exports must be called from an allowlisted server resource. A token is bound to the resource that created it and cannot be validated by a different resource. Events namedeventsCctv:server:* and eventsCctv:client:* are internal request and synchronization routes. They are not a stable public API. Do not call them from integrations.
