Get FiveM Configuration
Get FiveM Configuration for a community server.
GET https://api.sonorancad.com/v2/fivem/servers/{serverId}/configuration
Fetch the resolved FiveM configuration for a server in the authenticated community. The response combines the current master catalog defaults with this community/server's saved overrides. It includes core settings and all submodule settings, including their enabled states. Local bootstrap credentials (communityID, apiKey, serverId, and mode) are not part of values.
Configure settings in CAD under In-Game Integration > FiveM. Save persists the configuration; Apply and restart separately sends the configuration push event. These API endpoints read and acknowledge configuration; they do not edit it.
A revision of 0 means no configuration has been saved for this server. Defaults are returned, but the official resource waits for the first save before starting its submodules. schemaVersion describes the wire protocol; templateRevision identifies the master catalog and can change without changing the saved revision. Consumers must preserve dynamic object keys and JSON value types.
Authentication and parameters
Use Authorization: Bearer YOUR_API_KEY. serverId is the numeric ID of a server in that key's community (example: 1). SDKs can use their configured default server: omit the GET argument, or pass nil / undefined / None / null as the acknowledgement's first argument.
Example request
-- luarocks install sonoran.lua
-- For SonoranCADFiveM in-game usage, see the SonoranCADFiveM tab for the export-based client.
local Sonoran = require("sonoran")
local sonoran = Sonoran.createClient({
product = Sonoran.productEnums.CAD,
communityId = "YOUR_COMMUNITY_ID",
apiKey = "YOUR_API_KEY",
defaultServerId = 1
})
local response = sonoran.cad:getFiveMConfigurationV2(1)
if response.success then
print("Configuration revision:", response.data.revision)
else
print(response.reason)
endUse this tab when calling the v2 API from the server side of an in-game FiveM resource.
Sonoran.lua and Sonoran.js: use the
sonorancadexport to get the configured CAD client.Sonoran.Net: FiveM exports do not return a .NET client, so read the protected Sonoran CAD convars and create a client.
Sonoran.py: FiveM does not run Python resources; use the Sonoran.py tab for external integrations.
The API key is stored in sonoran_apiKey as a protected FiveM convar. Grant an authorized server resource access with add_convar_permission your-resource-name read sonoran_apiKey.
Sonoran.lua
local cad = exports["sonorancad"]:getCadClient()
local response = cad:getFiveMConfigurationV2()
if response.success then
print("Configuration revision:", response.data.revision)
else
print(response.reason)
endSonoran.js
(async () => {
const cad = exports["sonorancad"].getCadClient();
const response = await cad.getFiveMConfigurationV2();
if (response.success) {
console.log(response.data);
} else {
console.error(response.reason);
}
})();Sonoran.Net
Import this YAML into Postman using Import > Raw text.
Response
revision
Saved configuration revision, or 0 before the first save.
schemaVersion
Configuration protocol version; currently 1.
templateRevision
SHA-256 catalog fingerprint. Compare it as well as the revision.
serverId
Requested server ID.
values.core
Resolved core settings.
values.plugins
Resolved settings keyed by submodule name.
appliedRevision
Last acknowledged saved revision, or null.
appliedAt
Last acknowledgement timestamp, or null.
The OpenAPI example abbreviates values; real responses contain the full resolved configuration. HTTP returns this object directly. SDKs expose it as response.data and use response.success for request status.
On startup, the official resource fetches configuration before loading submodules and retries failed or unavailable configuration every 60 seconds. After loading, it acknowledges the revision. appliedRevision tracks the saved revision only; it does not record the catalog fingerprint or prove every integration is healthy.
401 means authentication failed. 404 means the server is not part of the authenticated community.
Last updated
Was this helpful?

