Skip to the content
Docs

FairShield

On this page5

The FairShield lookup tells staff whether a player's Discord account is in known cheat servers. It needs an API key from FairShield. The key is free, through our partnership with FairShield: ask for it in the FairShieldAC Discord (opens in a new tab). Until you set one, the lookup is off. The settings are in config_server.lua.

Switch it on

  1. Ask for your free API key in the FairShieldAC Discord (opens in a new tab). The panel has the same link: open the FairShield page and press Open FairShield Discord.
  2. Open config_server.lua and find ConfigServer.FairShield.
  3. Set Enabled to true and paste your key into ApiKey. Leave the other lines as they are.
  4. Restart the resource.
  5. Open the panel, go to FairShield, and press Look up on an online player.

The two lines after the change:

lua
    Enabled  = true,
    ApiKey   = '[YOUR FAIRSHIELD API KEY]',

The keys

KeyDefaultAllowedWhat it does
Enabledfalsetrue / falseThe switch of the lookup. The lookup works only with Enabled = true and a key in ApiKey.
ApiKey''The key FairShield gave youProves to FairShield that the request comes from your server. It is used on the server only and is never sent to a player's game.
BaseUrlAlready filled inLeave it as it isThe address of the FairShield service.
CacheTtl300Seconds · 0 = never keepHow long the answer for one Discord account is kept. A second lookup of the same account in that time shows the kept answer and does not ask FairShield again.
DiscordInviteAlready filled inA full https:// linkThe link behind Open FairShield Discord in the notice staff see while the lookup is off.
  • The kept answers are gone after a restart of the resource.
  • The panel sends FairShield the Discord ID of the player, nothing else about them.

While it is not configured

Nothing is sent to FairShield. Staff with the FairShield lookup permission see this:

WhereWhat staff see
The FairShield pageA notice Lookup not configured: "Get an API key in the FairShield Discord and add it to config_server.lua to turn the lookup on." Under it is the link Open FairShield Discord.
A player's profile, button Look up on FairShieldA card Not configured: "FairShield lookup is not configured. Ask the server owner for an API key in the FairShield Discord."

Who can use it

PermissionKeyNeeded for
FairShield lookupfairshield.lookupThe FairShield page and the Look up on FairShield button on a profile
Offline playersplayer.offlineA lookup from the profile of a player who is offline
  • The default ranks God, Admin and Moderator have FairShield lookup. See Super-Admin & Ranks.
  • Every lookup that goes to FairShield is written to the log with the tag /lookup.
  • The lookup works by Discord account. A player with no Discord linked to FiveM cannot be checked. Their row shows No Discord.

Problems

What staff readIn the server consoleWhyFix
"FairShield did not accept the API key. Tell the server owner."[5code-adminpanel] FairShield did not accept the API key (HTTP 401). Check ConfigServer.FairShield.ApiKey in config_server.lua.The key is wrong or no longer valid.Paste the key again, without spaces. If it still fails, ask for a new key in the FairShield Discord.
"FairShield refused the request. Tell the server owner."[5code-adminpanel] FairShield refused the lookup request (HTTP 403).FairShield does not allow this request.Ask in the FairShield Discord.
"Too many FairShield lookups right now. Wait a moment and try again."Many lookups were sent in a short time.Wait a moment and press Look up again.
"FairShield lookup failed. Try again later."FairShield did not answer, or the answer could not be read.Try again later. Check that BaseUrl is unchanged.
"This player has no Discord linked, so FairShield cannot check them."The player has no Discord linked to FiveM.Nothing to set. The player links Discord to FiveM.

Related: FairShield Lookup · Discord Webhooks · Troubleshooting.