txAdmin auth always “Unauthorized: token value”

Hi everyone, I’m building a txAdmin whitelist extension (resource: Ny-lb-Whitelist). I’m stuck on txAdmin auth and could use help. I can share the source code privately.

  • Environment

  • Windows (local dev)

  • FiveM FXServer + txAdmin (panel at 40120)

  • Server started via txAdmin panel; monitor resource is started

  • Goal

  • Call txAdmin whitelist endpoints from the server:

  • GET /whitelist/requests?page=…&searchString=…

  • GET /whitelist/approvals

  • And POST /whitelist/actions/* (add/remove/approve/deny…)

  • Use NUI auth headers:

  • X-TxAdmin-Token:

  • X-TxAdmin-Identifiers: license:…,fivem:… (from config.lua Config.TXAdmin.AdminIdentifiers)

  • Current symptoms

  • txAdmin-luaComToken is always removed, so requests are rejected by nuiAuthLogic as “Unauthorized: token value”

  • monitor shows started, but token never becomes a valid random string

  • Fallback to txCore exports (exports.monitor:getCore() / exports.txAdmin:getCore()) fails (no export available)

  • Key logs
    [NY-Whitelist] Diagnose: luaComHost=127.0.0.1:40120
    [NY-Whitelist] Diagnose: luaComToken=removed
    [NY-Whitelist] Diagnose: monitor state=started
    [NY-Whitelist-Provider] HTTP GET /whitelist/requests…
    [NY-Whitelist-Provider] Identifiers: license:…,fivem:…
    [NY-Whitelist-Provider] Token snippet: removed
    [NY-Whitelist-Provider] API error: Unauthorized: token value
    [NY-Whitelist-Provider] Fallback check: monitor=started, txAdmin=missing
    [NY-Whitelist-Provider] Fallback failed: cannot get txCore via exports

  • Tried so far

  • Full FXServer restart (not just reloading resources)

  • Ensure monitor only once at the top of server.cfg; no runtime restart/ensure of monitor

  • Not starting our bundled txAdmin-master/ as a resource

  • Real admin identifiers configured (normalized punctuation) in config.lua

  • Routes verified against tx source: /whitelist/:table and /whitelist/:table/:action

  • Our understanding

  • Our logic matches tx’s apiAuthMw → nuiAuthLogic. The failure is purely token == removed

  • Likely the current process is not the txAdmin-managed startup path (or monitor got restarted mid-run)

  • Questions

  • With monitor=started but luaComToken=removed for a long time, how can we restore a valid token?

  • Could this be two FXServer instances (panel A vs server B) causing token mismatch? Any recommended checks?

  • Is there a supported way to access txCore via exports in local dev without HTTP token?

  • Any recent changes to required NUI headers (e.g., must include license:) or header case sensitivity?

  • Known configs/versions that keep token “removed”? Any workaround?

  • Notes

  • Happy to provide the plugin source (server Lua + logs) and a minimal repro; can add more diagnostics as advised

  • We can temporarily fall back to a local file to keep the UI working, but we want the real txAdmin data flow

Thanks a lot for any pointers!