Skip to main content
POST https://api.sonorancad.com/v2/general/links/set
Rate limit: 30 requests per minute
Authenticated v2 endpoints are rate limited per API key rather than per IP address.
Directly assign a communityUserId to an account in the authenticated community. The account UUID and its community-specific secret UUID must match. If the in-game ID is already linked to another account, the link is reassigned atomically. This endpoint is intended for trusted server-side integrations such as the SonoranCADFiveM resource. Do not expose the community API key or forward account credentials from an untrusted client directly to this endpoint.

CAD Frontend Iframe Event

When the Sonoran CAD frontend is running inside an iframe, it sends the following message to its parent after every successful community login, re-login, or reconnect:
The event is not emitted in a top-level browser window or when either UUID is unavailable. It does not contain communityUserId; the parent integration must derive that value from the current in-game player and send all three values from its trusted server process to this endpoint. The parent page should verify both event.source and event.origin before accepting the credentials:
Treat secretUuid as sensitive. Do not log it, persist it in browser storage, or expose the community API key to the iframe or game client.

Request Body

All three properties are required. communityUserId may contain up to 255 characters.

Example Request

Response

A 403 response intentionally does not reveal whether the account UUID or secret UUID was incorrect.