For the complete documentation index, see llms.txt. This page is also available as Markdown.

Send Photo

Send a photo URL to active connections for a community user ID.

POST https://api.sonorancad.com/v2/general/photos

Rate limit: 10 requests per minute Authenticated v2 endpoints are rate limited per API key rather than per IP address.

Send a photo URL to every active connection linked to a community user ID.

Request Body

Use communityUserId by default, or provide roblox or discord to target the linked account that should receive the photo.

{
  "communityUserId": "player-1234",
  "url": "https://cdn.example.com/mugshots/example.png"
}

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:sendPhotoV2({
    communityUserId = 'player-1234',
    url = 'https =//example.com/mugshot.png',
  })

-- Inspect response.success, response.data, or response.reason as needed.
print(response.success)

Response

Successful requests return application/json.

Last updated

Was this helpful?